:root {
    --bg-main: #0c0a09;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #fafaf9;
    --text-muted: #a8a29e;

    /* Gradients */
    --accent-glow: #eab308;
    --accent-dark: #854d0e;
    --primary-gradient: linear-gradient(135deg, #fcd34d 0%, #f97316 100%);
    --card-gradient: linear-gradient(180deg, rgba(28, 25, 23, 0) 0%, rgba(28, 25, 23, 0.5) 100%);

    /* Metrics */
    --positive: #22c55e;

    /* Shadows & Effects */
    --glass-blur: blur(24px);
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

    /* Dynamic UI Elements */
    --country-bg: rgba(0, 0, 0, 0.5);
    --box-bg: rgba(0, 0, 0, 0.3);
    --box-border: rgba(255, 255, 255, 0.05);
    --box-text-title: #fcd34d;
    --box-text-body: #d6d3d1;
    --sub-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(249, 115, 22, 0.05) 100%);
    --sub-panel-border: rgba(249, 115, 22, 0.2);
    --sub-input-bg: rgba(0, 0, 0, 0.5);
    --sub-input-text: white;
}

body.light-mode {
    --bg-main: #f8fafc;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #0f172a;
    --text-muted: #475569;

    --accent-glow: #fbbf24;
    --accent-dark: #fef08a;
    /* lighter glow */
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 100%);

    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);

    --country-bg: rgba(255, 255, 255, 0.5);
    --box-bg: rgba(255, 255, 255, 0.5);
    --box-border: rgba(0, 0, 0, 0.05);
    --box-text-title: #d97706;
    --box-text-body: #334155;

    --sub-panel-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(249, 115, 22, 0.1) 100%);
    --sub-panel-border: rgba(249, 115, 22, 0.3);
    --sub-input-bg: rgba(255, 255, 255, 0.8);
    --sub-input-text: #0f172a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-dark), transparent 70%);
    top: -200px;
    left: -200px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7e22ce, transparent 70%);
    bottom: 20%;
    right: -100px;
    animation-delay: -5s;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

body.light-mode .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

body.light-mode .theme-toggle .icon-sun {
    display: block;
}

body.light-mode .theme-toggle .icon-moon {
    display: none;
}

.nav-cta {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Glass Panel Reusable */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--box-shadow);
}

/* Hero Section */
.hero {
    padding: 160px 24px 80px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    color: #fdba74;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* Country Selector */
.country-selector {
    display: inline-flex;
    background: var(--country-bg);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.country-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-btn:hover {
    color: var(--text-primary);
}

.country-btn.active {
    background: var(--bg-panel);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Trends Section */
.trends-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 120px;
}

.section-header {
    margin-bottom: 48px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h3 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-select {
    background: var(--country-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    color-scheme: dark;
}

body.light-mode .date-select {
    color-scheme: light;
}

.current-country-label {
    font-size: 1.25rem;
    color: #fcd34d;
    font-weight: 400;
    opacity: 0.8;
}

.section-header p {
    color: var(--text-muted);
}

/* Trend List */
.trend-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trend-card {
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.trend-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: var(--card-gradient);
    z-index: 0;
}

.trend-card>* {
    position: relative;
    z-index: 1;
}

.trend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.rank-badge {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    line-height: 0.8;
}

.trend-meta {
    flex-grow: 1;
}

.trend-name {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.trend-growth {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(34, 197, 94, 0.1);
    color: var(--positive);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.trend-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.reason-box,
.recipe-box {
    background: var(--box-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--box-border);
}

.reason-box strong,
.recipe-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--box-text-title);
    font-family: 'Outfit', sans-serif;
}

.reason-text,
.recipe-text {
    color: var(--box-text-body);
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.map-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.map-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Subscription Section */
.subscription-section {
    padding: 0 24px 120px;
    max-width: 800px;
    margin: 0 auto;
}

.sub-panel {
    text-align: center;
    padding: 64px 32px;
    background: var(--sub-panel-bg);
    border: 1px solid var(--sub-panel-border);
}

.sub-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.sub-content p {
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.sub-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto 16px;
}

.sub-input {
    flex-grow: 1;
    padding: 16px 24px;
    border-radius: 999px;
    background: var(--sub-input-bg);
    border: 1px solid var(--border-color);
    color: var(--sub-input-text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.sub-input:focus {
    border-color: #f97316;
}

.sub-btn {
    padding: 16px 32px;
    border-radius: 999px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sub-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.sub-note {
    font-size: 0.85rem !important;
    color: #4ade80 !important;
    margin: 0 !important;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .country-selector {
        flex-direction: column;
        border-radius: 16px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .country-btn {
        border-radius: 12px;
    }

    .trend-body {
        grid-template-columns: 1fr;
    }

    .sub-form {
        flex-direction: column;
    }

    .glass-panel {
        padding: 24px;
    }
}