:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #ef4444;
    --secondary-hover: #dc2626;
    --bg-color: #f3f4f6;
    --card-bg: #fff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --focus-ring: rgba(79, 70, 229, .4);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
    --radius: 12px
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: Outfit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.5
}

.container {
    width: 100%;
    max-width: 1400px;
    text-align: center;
    margin: 0 auto;
    animation: fadeIn .5s ease-out
}

.return-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: .95rem;
    margin-bottom: 24px;
    transition: all .2s;
    box-shadow: var(--shadow-md)
}

.return-button:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px)
}

.return-button svg {
    width: 16px;
    height: 16px
}

header {
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px
}

header p {
    color: var(--text-muted);
    font-size: 1rem
}

.converter-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
    transition: transform .2s ease;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto
}

.input-group {
    text-align: left
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: .95rem;
    color: var(--text-main)
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    transition: all .2s;
    background-color: #f9fafb
}

.input-group input:focus {
    outline: 0;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
    background-color: #fff
}

.input-group input[type=number]::-webkit-inner-spin-button,
.input-group input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.input-group input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield
}

.arrow-divider {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 300;
    user-select: none;
    text-align: center
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border: none;
    text-decoration: none;
    font-family: inherit;
    font-size: .95rem
}

.btn-secondary {
    background-color: var(--bg-color);
    color: var(--text-muted)
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: var(--text-main)
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-md)
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px)
}

.article-content {
    text-align: left;
    max-width: 1100px;
    margin: 48px auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm)
}

.article-content h1,
.article-content h2,
.article-content h3 {
    color: var(--text-main);
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.3
}

.article-content h1 {
    font-size: 2.25rem;
    margin-top: 0
}

.article-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px
}

.article-content h2:first-of-type {
    font-size: 2.25rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #374151
}

.article-content strong {
    color: #111827;
    font-weight: 600
}

.article-content code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: .9em;
    color: #dc2626
}

.article-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0
}

.article-content pre code {
    background: 0 0;
    color: #f9fafb;
    padding: 0
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 1rem
}

.article-content td,
.article-content th {
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    text-align: left
}

.article-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-main)
}

.article-content tr:nth-child(even) {
    background-color: #f8fafc
}

.article-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500
}

.article-content a:hover {
    text-decoration: underline
}

.article-content ol,
.article-content ul {
    margin: 16px 0;
    padding-left: 24px
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.7
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 32px 0
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@media (max-width:768px) {
    .article-content {
        padding: 24px;
        margin: 32px auto
    }

    .article-content h1 {
        font-size: 1.75rem
    }

    .article-content h2 {
        font-size: 1.5rem
    }

    .article-content table {
        font-size: .9rem
    }

    .article-content td,
    .article-content th {
        padding: 8px 12px
    }
}

@media (max-width:400px) {
    .converter-card {
        padding: 24px
    }

    header h1 {
        font-size: 1.75rem
    }

    .button-group {
        flex-direction: column
    }

    .btn {
        width: 100%
    }

    .article-content {
        padding: 20px
    }

    .article-content h1 {
        font-size: 1.5rem
    }

    .article-content h2 {
        font-size: 1.25rem
    }
}

.tools-grid-container {
    margin-bottom: 48px;
    text-align: center
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-main)
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

.flash-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center
}

.flash-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color)
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 4px
}

.flash-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0
}

.flash-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4
}

.flash-card:hover h3 {
    color: var(--primary-color)
}

@media (max-width:480px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }
}