/* 
   剧盒 JuHe - Core Design System 
   High-end Experience | Mobile First
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* --- Palette: Midnight & Gold --- */
    --c-bg-main: #050505;
    --c-bg-card: rgba(30, 30, 35, 0.6);
    --c-bg-glass: rgba(20, 20, 20, 0.85);
    
    --c-gold-100: #F9F1D8;
    --c-gold-300: #EEDC9A;
    --c-gold-500: #D4AF37; /* Primary Brand */
    --c-gold-700: #AA8C2C;
    --c-gold-900: #66541A;
    
    --c-text-primary: #F5F5F5;
    --c-text-secondary: #A0A0A0;
    --c-text-muted: #666666;
    
    --c-accent-red: #991B1B;
    --c-accent-green: #065F46;

    /* --- Dimensions --- */
    --header-height: 64px;
    --sidebar-width: 260px;
    --mobile-nav-height: 60px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* --- Fonts --- */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', 'Songti SC', 'SimSun', serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--c-bg-main);
    color: var(--c-text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul, li { list-style: none; padding: 0; margin: 0; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

/* --- Layout Architecture --- */
.juhe-app {
    display: flex;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 40%);
}

/* Desktop Sidebar */
.desktop-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    background: var(--c-bg-glass);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 50;
    backdrop-filter: blur(20px);
}

/* Mobile Bottom Nav */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-nav-height);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Prevent flex overflow */
}

.app-header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    transition: background 0.3s;
}

.app-header.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-container {
    padding: 24px 32px;
    flex: 1;
    width: 100%;
    margin: 0 auto;
}

/* --- Brand Identity --- */
.juhe-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.juhe-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.juhe-logo span {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--c-gold-500);
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--c-gold-300), var(--c-gold-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Navigation Items --- */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--c-text-secondary);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--c-text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--c-bg-main);
    background: linear-gradient(90deg, var(--c-gold-300), var(--c-gold-500));
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.nav-link.active i {
    color: var(--c-bg-main);
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--c-text-muted);
    margin: 24px 0 8px 16px;
}

/* --- UI Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--c-gold-500), var(--c-gold-700));
    color: #fff;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--c-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- Mobile Adaptations --- */
@media (max-width: 768px) {
    .desktop-sidebar {
        display: none;
    }

    .mobile-tab-bar {
        display: flex;
    }

    .app-header {
        padding: 0 16px;
        height: 56px;
    }

    .page-container {
        padding: 16px;
        padding-bottom: 80px; /* Space for bottom bar */
    }

    /* Mobile Tab Item */
    .tab-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--c-text-muted);
        font-size: 10px;
        height: 100%;
    }

    .tab-link i {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .tab-link.active {
        color: var(--c-gold-500);
    }
    
    .tab-link.active i {
        filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
    }
}

/* --- Utilities --- */
.text-gold { color: var(--c-gold-500); }
.text-serif { font-family: var(--font-serif); }
.full-width { width: 100%; }
