:root {
    /* New Design Tokens */
    --h-blue: #5D8AFE;
    --h-dark: #1A1D23;
    --h-muted: #64748B;
    --h-white: #FFFFFF;
    --h-glass: rgba(255, 255, 255, 0.7);
    --h-glow-primary: #C4B5FD;
    --h-glow-secondary: #A5B4FC;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* Original styles.css Variables (for compatibility) */
    --bg-page: #EEF1F6;
    --bg-white: #FFFFFF;
    --text-main: #111111;
    --text-muted: #555555;
    --text-border: #D1D5DB;
    --color-green: #2BBD75;
    --color-green-hover: #26a566;
    --color-blue: #0066FF;
    --color-blue-hover: #005ce6;
    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Global Flicker Protection */
.sign-in-btn,
#navLiveContainer,
#openUploadModalBtn,
#openUploadNoteModalBtn,
#adminControls {
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

body {
    background-color: var(--bg-page);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

a {
    text-decoration: none;
    color: inherit;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 12px 24px;
    transition: all 0.3s ease;
}

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

.logo-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--color-blue);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover {
    transform: scale(1.05);
}

.logo-wrapper .brand-avatar {
    border-radius: 50%;
}

.brand-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-wrapperw {
    width: 260px;
    height: 50px;
    overflow: hidden;
    position: relative;
    padding: 2px;
}

.brand-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons (Restored from original styles.css) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.btn-primary {
    background: linear-gradient(135deg, #4F8CFF, #7B61FF);
    color: white;
    border: none;
    padding: 8px 20px;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 140, 255, 0.4);
}

.subs-btn {
    background-color: #F8F9FB;
}

.yt-icon {
    width: 20px;
    height: 14px;
    color: #666;
}

/* Navbar Live Indicator */
.nav-live-indicator {
    width: 8px;
    height: 8px;
    background-color: #EA4335;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(234, 67, 53, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(234, 67, 53, 0);
    }
}

/* Responsive adjustments (Restored from original styles.css) */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1010;
}

.hamburger-btn span {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-main);
    border-radius: 4px;
    transition: var(--transition);
}

@media (max-width: 900px) {
    .hamburger-btn {
        display: flex;
    }

    .nav-actions {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 100px 30px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
        z-index: 1005;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        gap: 20px;
        overflow-y: auto;
    }

    .nav-actions.active {
        right: 0;
    }

    .controls-group {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .controls-group .btn {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
    }

    /* Hamburger Animation */
    .hamburger-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger-btn.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(10px);
    }

    .hamburger-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* Premium Mobile Overrides (From Prompt's Hero style block) */
@media (max-width: 600px) {
    .navbar {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* FIX HORIZONTAL SCROLL */
body {
    overflow-x: hidden;
}

/* LOCK SCROLL WHEN MENU OPEN */
body.menu-open {
    overflow: hidden;
}