:root {
    /* Colors - Dark Mode Default */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #a855f7;
    --accent: #f43f5e;
    --bg-main: #0b0f1a;
    --card-bg: rgba(22, 28, 45, 0.7);
    --glass-stroke: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --success: #10b981;

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Effects */
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.3);
    --glass-blur: 20px;
}

[data-theme="light"] {
    --bg-main: #f0f2f5;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-stroke: rgba(0, 0, 0, 0.05);
    --text-main: #0f172a;
    --text-dim: #64748b;
    --shadow-premium: 0 20px 50px rgba(100, 116, 139, 0.1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animations */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    animation: float 25s infinite alternate ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -10%;
    right: -10%;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -10%;
    left: -5%;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 40%;
    left: 20%;
    opacity: 0.1;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-main) 100%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Navigation */
.top-nav {
    padding: 1.5rem 2rem;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary);
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--glass-stroke);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* App Layout */
.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.hero-section {
    text-align: center;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: inline-block;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-dim);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Converter Card */
.card.glass {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-stroke);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--shadow-premium);
}

.converter-header {
    margin-bottom: 2.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
}

.dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.inputs-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: end;
    margin-bottom: 3rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.field-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper,
.select-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-stroke);
    border-radius: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

[data-theme="light"] .input-wrapper,
[data-theme="light"] .select-wrapper {
    background: rgba(0, 0, 0, 0.02);
}

.input-wrapper:focus-within,
.select-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.currency-symbol {
    padding-left: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
    white-space: nowrap;
}

#amount {
    width: 100%;
    flex: 1;
    background: transparent;
    border: none;
    padding: 1.25rem;
    color: var(--text-main);
    font-size: 1.5rem;
    font-family: inherit;
    font-weight: 700;
    outline: none;
}

.currency-selectors {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.currency-selectors .field-group {
    flex: 1;
}

.select-wrapper {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
    min-height: 4.5rem;
}

.flag-icon {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

select {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 0;
    color: var(--text-main);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.swap-action {
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.swap-action:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

/* Result Area */
.result-display {
    padding-top: 3rem;
    border-top: 1px solid var(--glass-stroke);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

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

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

.result-main {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.code-badge {
    font-size: 1.25rem;
    background: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    color: white;
}

.result-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

#conversion-rate {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dim);
}

.visual-divider {
    height: 1px;
    width: 100px;
    background: linear-gradient(to right, transparent, var(--glass-stroke), transparent);
}

.info-text {
    font-size: 0.875rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 2rem;
}

.seo-article h2,
.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

.seo-article h3 {
    margin: 1.5rem 0 0.75rem;
}

.seo-article p {
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.seo-article ul {
    list-style: none;
    margin: 1.5rem 0;
}

.seo-article li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-dim);
}

.seo-article li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 12px;
    height: 2px;
    background: var(--primary);
}

.rates-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.rates-table caption {
    padding: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.rates-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
}

.rates-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-stroke);
    font-size: 0.875rem;
}

.rates-table tr:last-child td {
    border-bottom: none;
}

/* FAQ */
.faq-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item h4 {
    margin-bottom: 0.5rem;
}

.faq-item p {
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* Footer */
.app-footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--glass-stroke);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-logo span {
    color: var(--primary);
}

.footer-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

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

/* Responsiveness */
@media (max-width: 850px) {
    .inputs-row {
        grid-template-columns: 1fr;
    }

    .currency-selectors {
        flex-direction: column;
    }

    .swap-action {
        transform: rotate(90deg);
    }

    .swap-action:hover {
        transform: rotate(270deg) scale(1.1);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .app-container {
        padding: 1rem;
    }

    .card.glass {
        padding: 1.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-stroke);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}