/* CSS Reset & Baseline */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

:root {
    /* Light-first palette — sky blues & clean whites */
    --bg-color: #f0f7ff;
    --primary-color: #ffffff;
    --secondary-color: #bae6fd;
    --accent-color: #475569;
    --text-color: #0f172a;
    --highlight-color: #0ea5e9;
    --highlight-hover: #0284c7;
    --surface: #e0f2fe;

    /* Status Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    /* UI Values */
    --border-radius: 1rem;
    --border-radius-sm: 0.8rem;
    --transition: 0.25s ease;
    --shadow: 0 4px 24px rgba(14, 165, 233, 0.10);
    --shadow-card: 0 2px 12px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 32px rgba(14, 165, 233, 0.14);
    --shadow-glow: 0 0 0 1px rgba(14, 165, 233, 0.12);

    /* Conversor UI */
    --surface-color: #ffffff;
    --surface-hover: #e8f4fd;
    --border-color: #c7e2f5;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --radius: 1rem;

    --nav-height: 6rem;
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-color: #0c1a2e;
    --primary-color: #142035;
    --secondary-color: #1e3a5f;
    --accent-color: #94a3b8;
    --text-color: #e2e8f0;
    --highlight-color: #38bdf8;
    --highlight-hover: #0ea5e9;
    --surface: #1a2f4a;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 0 1px rgba(56, 189, 248, 0.08);

    /* Conversor UI */
    --surface-color: #142035;
    --surface-hover: #1a2f4a;
    --border-color: #1e3a5f;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1.6rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--nav-height);
    transition: background-color var(--transition), color var(--transition);
}

/* =========================================================================
   NAVBAR
   ========================================================================= */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(240, 247, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(186, 230, 253, 0.6);
    z-index: 1000;
    transition: background var(--transition);
}

body.dark-theme .main-nav {
    background: rgba(12, 26, 46, 0.95);
    border-bottom-color: rgba(30, 58, 95, 0.6);
}

.nav-container {
    max-width: 120rem;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.nav-logo:hover { transform: scale(1.08); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 2.4rem;
    height: 2px;
    background-color: var(--text-color);
    transition: all var(--transition);
    border-radius: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0.6rem 0;
    position: relative;
    transition: color var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--highlight-color);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active { color: var(--highlight-color); }

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--secondary-color);
    color: var(--text-color);
    width: 3.8rem;
    height: 3.8rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    margin-left: 2rem;
}

.theme-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: currentColor;
}

/* Dark mode: show moon; Light mode: show sun */
.light-icon { display: none; }

body.dark-theme .dark-icon { display: none; }
body.dark-theme .light-icon { display: block; }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--primary-color);
        border-bottom: 1px solid var(--secondary-color);
        padding: 2rem;
        transform: translateY(-100%);
        visibility: hidden;
        transition: transform var(--transition), visibility var(--transition);
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateY(0);
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .nav-link { font-size: 1.8rem; }
}

/* =========================================================================
   MAIN LAYOUT
   ========================================================================= */

.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    margin-top: 3.5rem;
    width: 100%;
    max-width: 70rem;
    text-align: center;
    padding: 0 2rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    letter-spacing: -0.5px;
    font-weight: 800;
    line-height: 1.2;
}

.app-header p {
    color: var(--accent-color);
    font-size: 1.5rem;
    line-height: 1.6;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    padding: 0.6rem 1.4rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 2rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-success);
}

.privacy-badge svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
}

.app-container {
    width: 100%;
    max-width: 70rem;
    padding: 0 2rem;
}

/* =========================================================================
   COMPRESSOR BOX
   ========================================================================= */

.compressor-box {
    background: var(--primary-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--secondary-color);
}

body.dark-theme .compressor-box {
    border-color: rgba(255,255,255,0.06);
}

/* Drop Zone */
.drop-zone {
    border: 2.5px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-color);
    margin-bottom: 2.5rem;
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--highlight-color);
    background: rgba(14, 165, 233, 0.05);
}

.drop-zone-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    color: var(--highlight-color);
    opacity: 0.7;
}

.drop-zone-text {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.drop-zone-subtext {
    font-size: 1.3rem;
    color: var(--accent-color);
}

.drop-zone-subtext span {
    color: var(--highlight-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 520px) {
    .options-grid { grid-template-columns: 1fr; }
}

.option-group label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-group .label-value {
    color: var(--highlight-color);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 0.7rem;
    background: var(--surface);
    border-radius: 0.35rem;
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--highlight-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.slider::-webkit-slider-thumb:hover {
    background: var(--highlight-hover);
    transform: scale(1.15);
}

.select-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-color);
    border: 1.5px solid var(--secondary-color);
    border-radius: 0.7rem;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230ea5e9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    padding-right: 3rem;
}

.select-input:focus { border-color: var(--highlight-color); }

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.toggle-row span {
    font-size: 1.4rem;
    color: var(--accent-color);
}

.toggle-switch {
    position: relative;
    width: 4.4rem;
    height: 2.4rem;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border-radius: 2.4rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1.5px solid var(--secondary-color);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.6rem;
    height: 1.6rem;
    left: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--highlight-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    background: var(--highlight-color);
    transform: translateX(2rem) translateY(-50%);
}

/* Compress Button */
.compress-btn {
    width: 100%;
    padding: 1.7rem;
    background: var(--highlight-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    letter-spacing: 0.3px;
}

.compress-btn:hover {
    background: var(--highlight-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}

.compress-btn:active { transform: translateY(0); }

.compress-btn:disabled {
    background: var(--secondary-color);
    color: var(--accent-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.compress-btn svg {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
}

/* Progress bar */
.progress-bar-wrap {
    margin-top: 2rem;
    display: none;
}

.progress-bar-wrap.visible { display: block; }

.progress-bar-track {
    width: 100%;
    height: 0.6rem;
    background: var(--surface);
    border-radius: 0.3rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--highlight-color);
    border-radius: 0.3rem;
    transition: width 0.3s ease;
}

.progress-label {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 0.6rem;
    text-align: center;
}

/* =========================================================================
   RESULT SECTION
   ========================================================================= */

.result-section {
    display: none;
    margin-top: 3rem;
}

.result-section.visible { display: block; }

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.savings-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-success);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 520px) {
    .preview-grid { grid-template-columns: 1fr; }
}

.preview-card {
    background: var(--surface);
    border-radius: 0.8rem;
    overflow: hidden;
    border: 1px solid var(--secondary-color);
}

body.dark-theme .preview-card {
    border-color: rgba(255,255,255,0.06);
}

.preview-card-label {
    padding: 0.8rem 1.2rem;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-card-label .file-size {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--highlight-color);
    font-variant-numeric: tabular-nums;
}

.preview-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-conic-gradient(rgba(0,0,0,0.05) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px;
    min-height: 16rem;
    max-height: 28rem;
    overflow: hidden;
}

.preview-img-wrap img {
    max-width: 100%;
    max-height: 28rem;
    object-fit: contain;
    display: block;
}

/* Stats row */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--highlight-color);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 4rem;
    background: var(--secondary-color);
}

/* Download button */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    padding: 1.6rem;
    background: var(--color-success);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.7rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.download-btn:active { transform: translateY(0); }

.download-btn svg {
    width: 2rem;
    height: 2rem;
    stroke: currentColor;
}

.compress-again-btn {
    display: block;
    width: 100%;
    margin-top: 1.2rem;
    padding: 1rem;
    background: transparent;
    border: 1.5px solid var(--secondary-color);
    border-radius: var(--border-radius);
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.compress-again-btn:hover {
    border-color: var(--highlight-color);
    color: var(--highlight-color);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 2000;
    pointer-events: none;
}

.toast {
    background: var(--text-color);
    color: var(--bg-color);
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.4rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(1rem);
    animation: slideUpFade 0.3s forwards;
    white-space: nowrap;
}

.toast.error { background: var(--color-error); color: #fff; }

/* =========================================================================
   INFO SECTIONS
   ========================================================================= */

.info-section {
    margin-top: 4rem;
    width: 100%;
    max-width: 80rem;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-weight: 700;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--secondary-color);
    margin: 4rem auto;
    width: 60%;
    opacity: 0.5;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

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

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-card);
}

body.dark-theme .info-card {
    border-color: rgba(255,255,255,0.06);
}

.info-card:hover {
    transform: translateY(-0.4rem);
    box-shadow: var(--shadow);
}

.card-icon {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 1.2rem;
    background: rgba(14, 165, 233, 0.12);
    color: var(--highlight-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-svg {
    width: 2.2rem;
    height: 2.2rem;
}

.info-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    font-weight: 600;
}

.info-card p {
    font-size: 1.4rem;
    color: var(--accent-color);
    line-height: 1.5;
}

.step-card {
    align-items: flex-start;
    text-align: left;
}

.step-card .step-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.step-card .card-icon {
    margin-bottom: 0;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
}

.step-card .icon-svg { width: 1.8rem; height: 1.8rem; }

.step-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--highlight-color);
    font-family: monospace;
}

.step-card h3 { margin-bottom: 0; }

/* =========================================================================
   FAQ
   ========================================================================= */

.faq-container {
    margin-top: 4rem;
    padding: 3rem;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--secondary-color);
    width: 100%;
    max-width: 80rem;
}

body.dark-theme .faq-container {
    border-color: rgba(255,255,255,0.06);
}

.faq-container h2 {
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--highlight-color);
    text-align: center;
    letter-spacing: -0.5px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.faq-item {
    background: var(--bg-color);
    border-radius: 0.7rem;
    border: 1px solid rgba(186, 230, 253, 0.6);
    overflow: hidden;
    transition: var(--transition);
}

body.dark-theme .faq-item {
    border-color: rgba(30, 58, 95, 0.8);
}

.faq-item:hover { border-color: rgba(14, 165, 233, 0.4); }

.faq-item summary {
    padding: 1.8rem 5rem 1.8rem 1.8rem;
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
    position: relative;
    user-select: none;
    transition: color var(--transition);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--highlight-color);
    transition: transform var(--transition);
}

.faq-item[open] summary {
    color: var(--highlight-color);
    border-bottom: 1px solid var(--secondary-color);
}

.faq-item[open] summary::after { content: '−'; }

.faq-answer {
    padding: 2rem 1.8rem;
    color: var(--accent-color);
    line-height: 1.6;
    font-size: 1.45rem;
    animation: fadeInDown 0.25s ease forwards;
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.app-footer {
    width: 100%;
    margin-top: 5rem;
    background: var(--primary-color);
    border-top: 1px solid var(--secondary-color);
}

.footer-main {
    max-width: 120rem;
    margin: 0 auto;
    padding: 4rem 3rem 3rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-logo {
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover { opacity: 1; transform: scale(1.05); }

.footer-tagline {
    font-size: 1.4rem;
    color: var(--accent-color);
    line-height: 1.6;
    max-width: 34rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.footer-col-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-col-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.4rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(186, 230, 253, 0.4);
    background: rgba(14, 165, 233, 0.03);
    padding: 1.8rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

body.dark-theme .footer-bottom {
    background: rgba(0,0,0,0.15);
    border-top-color: rgba(30,58,95,0.5);
}

.footer-bottom p {
    font-size: 1.2rem;
    color: var(--accent-color);
    line-height: 1.5;
    margin: 0;
}

.footer-bottom a {
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 900px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

@media (max-width: 600px) {
    .footer-main { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { align-items: center; }
    .footer-tagline { max-width: 100%; }
    .footer-col { align-items: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* =========================================================================
   ARTICLE PAGE
   ========================================================================= */

.article-container {
    width: 100%;
    max-width: 80rem;
    padding: 4rem 2rem;
    margin: 0 auto;
}

.article-container h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-meta {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--secondary-color);
}

.article-container h2 {
    font-size: 2.2rem;
    margin: 3rem 0 1.5rem;
    color: var(--highlight-color);
    font-weight: 700;
}

.article-container h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.article-container p {
    font-size: 1.6rem;
    line-height: 1.8;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.article-container ul,
.article-container ol {
    margin: 1.5rem 0;
    padding-left: 3rem;
}

.article-container li {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.article-container strong { color: var(--text-color); }

.article-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1.5rem;
}

.article-container th,
.article-container td {
    padding: 1.2rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--secondary-color);
}

.article-container th {
    font-weight: 700;
    color: var(--text-color);
    background: var(--surface);
}

.article-cta {
    margin-top: 3rem;
    padding: 3rem;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    border: 1px solid rgba(14, 165, 233, 0.25);
    text-align: center;
    box-shadow: var(--shadow-card);
}

.article-cta p { margin-bottom: 1.5rem; }

.article-cta .cta-btn {
    display: inline-block;
    padding: 1.4rem 3rem;
    background: var(--highlight-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 1.6rem;
    font-weight: 700;
    transition: all var(--transition);
}

.article-cta .cta-btn:hover {
    background: var(--highlight-hover);
    transform: translateY(-2px);
}

/* =========================================================================
   COOKIE BANNER
   ========================================================================= */

#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 64rem;
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

body.dark-theme #cookie-banner {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

#cookie-banner p {
    font-size: 1.4rem;
    color: var(--accent-color);
    line-height: 1.5;
    margin: 0;
}

#cookie-banner a {
    color: var(--highlight-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.9rem 2rem;
    border-radius: 0.7rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.cookie-btn--accept {
    background: var(--highlight-color);
    color: #fff;
}

.cookie-btn--accept:hover { background: var(--highlight-hover); }

.cookie-btn--reject {
    background: transparent;
    border: 1.5px solid var(--secondary-color);
    color: var(--accent-color);
}

.cookie-btn--reject:hover {
    border-color: var(--accent-color);
    color: var(--text-color);
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   UTILS
   ========================================================================= */

.hidden { display: none !important; }

/* =========================================================================
   CONVERSOR (UI FINTECH)
   ========================================================================= */
.converter-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo sutil en el borde superior */
.converter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--highlight-color), transparent);
}

.converter-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.input-group {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 1.8rem 0;
    transition: var(--transition);
}

.input-group:focus-within .input-label {
    color: var(--highlight-color);
}

.input-label {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.currency-select-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 140px;
}

.currency-select {
    width: 100%;
    appearance: none;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    padding-right: 3rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.currency-select:hover {
    border-color: var(--text-muted);
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.select-arrow {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
    width: 1.6rem;
    height: 1.6rem;
}

.amount-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2.8rem;
    font-weight: 700;
    text-align: right;
    width: 100%;
    font-family: 'Inter', monospace;
    padding: 0;
    outline: none;
}

.amount-input::placeholder {
    color: var(--border-color);
}

/* El resultado (QUIERO) se muestra en azul para diferenciarlo del input */
.target-amount .amount-input {
    color: var(--highlight-color);
}

/* Botón de Intercambio (Swap) */
.swap-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0;
    z-index: 10;
}

.swap-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border-color);
}

.swap-btn {
    background: var(--surface-color);
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--highlight-color);
    transition: var(--transition);
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.15);
    position: relative;
    z-index: 1;
}

.swap-btn:hover {
    background: var(--highlight-color);
    border-color: var(--highlight-color);
    color: #ffffff;
    transform: rotate(180deg);
}

.swap-btn svg {
    width: 20px;
    height: 20px;
}

/* Info del Rate */
.rate-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rate-value {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.6rem;
}

.update-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

/* =========================================================================
   TOAST NOTIFICATIONS
   ========================================================================= */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
}

.toast {
    background: var(--surface-color);
    color: var(--text-main);
    padding: 1.2rem 2rem;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    font-size: 1.4rem;
    font-weight: 500;
    animation: slideIn 0.3s ease forwards;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* =========================================================================
   FEATURES GRID
   ========================================================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.feature-card svg {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.feature-card p {
    font-size: 1.4rem;
    color: var(--text-muted);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
footer {
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 1.4rem;
}

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

.footer-links a {
    color: var(--text-muted);
    font-size: 1.4rem;
}

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

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    width: 100%;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 600px) {
    main {
        padding: 3rem 1.5rem;
    }
    
    .hero-section {
        margin-bottom: 2.5rem;
    }

    .hero-section h1 {
        font-size: 3rem;
        margin-bottom: 0.5rem;
    }

    .hero-section p {
        font-size: 1.4rem;
    }
    
    .brand img {
        height: 2.6rem;
    }
    
    .nav-container {
        padding: 1.2rem 1.5rem;
    }

    .converter-card {
        padding: 2rem 1.5rem;
    }
    
    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .currency-select-wrapper {
        width: 100%;
    }
    
    .amount-input {
        text-align: left;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }
    
    .swap-wrapper {
        margin: 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }
}
