@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #ef4444;
    --secondary-hover: #dc2626;
    --success-color: #10b981;
    --success-bg: #f0fdf4;
    --success-border: #86efac;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --focus-ring: rgba(79, 70, 229, 0.4);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

* {
    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);
    background-image:
        radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(124, 58, 237, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 24px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-nav {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

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

.converter-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 500px;
    margin: 0 auto 40px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.converter-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f9fafb;
    color: var(--text-main);
}

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

.result-group label {
    color: var(--success-color);
}

.result-group input {
    background-color: var(--success-bg);
    border-color: var(--success-border);
    font-weight: 700;
    color: #065f46;
}

.result-group input:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.arrow-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    opacity: 0.5;
}

.button-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: var(--text-muted);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
    filter: brightness(1.1);
}

.ads-wrapper {
    margin: 40px auto;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.info-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 60px;
    text-align: left;
}

.info-section h2 {
    font-size: 1.85rem;
    margin-bottom: 24px;
    margin-top: 40px;
    color: var(--text-main);
    border-left: 5px solid var(--primary-color);
    padding-left: 20px;
    line-height: 1.2;
}

.info-section h2:first-of-type {
    margin-top: 0;
}

.info-section h3 {
    font-size: 1.35rem;
    margin: 32px 0 16px 0;
    color: var(--text-main);
    font-weight: 600;
}

.info-section p {
    margin-bottom: 20px;
    color: #4b5563;
    line-height: 1.8;
}

.info-section ul,
.info-section ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.info-section li {
    margin-bottom: 12px;
    color: #4b5563;
}

.info-section pre {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}

.info-section code {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.table-responsive {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.info-section table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.info-section th,
.info-section td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

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

.info-section tr:last-child td {
    border-bottom: none;
}

.info-section tr:nth-child(even) {
    background: #fcfcfd;
}

.related-links {
    list-style: none;
    padding-left: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.related-links a {
    display: block;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
}

.related-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.faq-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Tools Flashcards */
.tools-section {
    margin-bottom: 60px;
}

.tools-section h2 {
    font-size: 1.85rem;
    margin-bottom: 32px;
    color: var(--text-main);
    text-align: center;
}

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

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
}

.tool-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.tool-card span {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

.tool-card:hover span {
    color: var(--primary-color);
}

.footer {
    width: 100%;
    padding: 60px 24px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

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

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

@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

    .converter-card {
        padding: 24px;
    }

    .btn {
        width: 100%;
    }

    .button-actions {
        flex-direction: column;
    }

    .info-section {
        padding: 24px;
    }
}