:root {
    --primary: #007BFF;
    --background: #0a0a0a;
    --text: rgba(255,255,255,0.9);
    --card-bg: rgba(255,255,255,0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 60px;
    --header-shrink-height: 50px;
        color-scheme: dark;
}

[data-theme="light"] {
    --background: #ffffff;
    --text: #2d3748;
    --card-bg: rgba(0,0,0,0.05);
    color-scheme: light;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height); /* Space for fixed header */
}

/* ======= Compact Header ======= */
.header {
    height: var(--header-height);
    padding: 0 1.5rem;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 180px;
    height: auto;
    transition: var(--transition);
}

.trending-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    white-space: nowrap;
}

/* Simplified Select Styling */
.country-select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--text);
    color: var(--text);
    border-radius: 8px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

.country-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Native option styling */
.country-select option {
    background: var(--background);
    color: var(--text);
}

/* Modern Light Theme Border */
[data-theme="light"] .country-select {
    border-color: rgba(0,0,0,0.2);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.2rem;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

/* Scroll-shrink header effect */
.header.shrink {
    height: var(--header-shrink-height);
    box-shadow: 0 1px 8px rgba(0,0,0,0.1);
}

.header.shrink .logo-img {
    width: 150px;
}

/* ======= Main Content ======= */
.container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 1rem 40px; /* Bottom padding for footer */
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Keeps video from becoming too large */
    margin: 2rem auto;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}


.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ======= Video Metadata ======= */
.video-info {
    margin: 2rem 0;
}

.video-title {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.youtube-attribution {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    margin: 1rem 0;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    transition: var(--transition);
}

.meta-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.meta-item i {
    color: var(--primary);
}

/* ======= Navigation Controls ======= */
.nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.nav-button {
    background: var(--card-bg);
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
    font-weight: 500;
}

.nav-button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ======= Mobile Responsive ======= */
@media (max-width: 768px) {
    :root {
        --header-height: 50px;
        --header-shrink-height: 40px;
    }

    .header {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .logo-img {
        width: 140px !important;
    }

    .trending-label {
        display: none;
    }

    .country-select {
        font-size: 0.8rem;
        height: 34px;
        padding: 0.3rem 1.5rem 0.3rem 0.5rem;
    }

    .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .video-title {
        font-size: 1.3rem;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
        justify-content: center;
    }
}

/* ======= GDPR Banner ======= */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 1.5rem;
    text-align: center;
    z-index: 1000;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
}

/* ======= Footer ======= */
.site-footer {
    background: var(--card-bg);
    color: var(--text);
    padding: 2rem 1rem;
    margin-top: auto; /* Key change */
    border-top: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-link {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

/* ======= Animations ======= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======= Theme Overrides ======= */
[data-theme="light"] {
    .country-select {
        border-color: rgba(0,0,0,0.1);
    }
    .site-footer {
        border-top-color: rgba(0,0,0,0.1);
    }
    .trending-label {
        color: rgba(0,0,0,0.7);
    }
}