/* assets/app.css - CLASSIC SIDEBAR VERSION */

:root {
    --primary: #00f2ea;
    --secondary: #ff0050;
    --bg-body: #050505;
    --bg-card: #121212;
    --border: #222;
    --text: #ffffff;
    --text-muted: #888;
    --sidebar-w: 260px;
    --header-h: 80px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

body {
    background-color: var(--bg-body);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* UTILS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 25px; border-radius: 50px; font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #000; box-shadow: 0 0 20px rgba(0, 242, 234, 0.2); }
.btn-outline { background: transparent; border: 1px solid #333; color: white; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.text-gradient { background: linear-gradient(90deg, var(--primary), #fff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* =========================================
   2. LANDING PAGE STYLES
   ========================================= */
body.landing-page { padding-top: var(--header-h); }

.landing-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-h);
    background: rgba(10, 10, 10, 0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); z-index: 2000;
    display: flex; align-items: center; justify-content: space-between; padding: 0 5%;
}
.landing-nav .brand { font-size: 1.3rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: white; }
.landing-nav .brand span { color: var(--primary); }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-menu a:hover { color: white; }
.mobile-toggle { display: none; font-size: 1.8rem; cursor: pointer; color: white; }

/* Sections */
body.landing-page .hero { padding: 100px 0 60px; text-align: center; }
body.landing-page .hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; margin-bottom: 20px; }
body.landing-page .hero-stats { display: flex; justify-content: center; gap: 50px; margin-top: 60px; border-top: 1px solid var(--border); padding-top: 30px; }
body.landing-page .feature-card { background: var(--bg-card); padding: 40px; border-radius: 20px; border: 1px solid var(--border); }
body.landing-page footer { border-top: 1px solid var(--border); padding: 60px 0; margin-top: 60px; background: #000; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }

/* =========================================
   3. DASHBOARD & ADMIN STYLES
   ========================================= */
body.dashboard-page { padding-left: var(--sidebar-w); }

/* SIDEBAR (Always Vertical) */
.app-nav {
    position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
    background: var(--bg-card); border-right: 1px solid var(--border);
    padding: 30px 20px; display: flex; flex-direction: column; z-index: 1100;
    transition: transform 0.3s ease-in-out;
}
.app-nav .brand { font-size: 1.3rem; font-weight: 800; margin-bottom: 40px; display: flex; align-items: center; gap: 10px; color: white; }
.app-nav .brand span { color: var(--primary); }

.nav-links { display: flex; flex-direction: column; gap: 5px; flex: 1; overflow-y: auto; }

.nav-item {
    display: flex; align-items: center; gap: 15px; padding: 12px 15px;
    color: var(--text-muted); border-radius: 10px; font-weight: 500; font-size: 0.9rem;
}
.nav-item:hover { background: #1a1a1a; color: white; }
.nav-item.active { background: rgba(0, 242, 234, 0.1); color: var(--primary); }
.nav-item ion-icon { font-size: 1.4rem; }

/* Toggle Button for Sidebar (Mobile Only) */
.sidebar-toggle {
    display: none; position: fixed; top: 20px; right: 20px; z-index: 1200;
    background: #000; border: 1px solid #333; color: white; width: 45px; height: 45px;
    border-radius: 50%; justify-content: center; align-items: center; font-size: 1.5rem;
}

/* Content */
.main-container { padding: 40px; max-width: 1100px; margin: 0 auto; min-height: 100vh; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 25px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.user-pill { background: #1a1a1a; padding: 6px 15px; border-radius: 50px; font-size: 0.8rem; border: 1px solid #333; display: flex; align-items: center; gap: 8px; }
.video-frame { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
video { width: 100%; height: 100%; display: block; }

/* =========================================
   4. MOBILE RESPONSIVE RULES
   ========================================= */
@media (max-width: 900px) {
    
    /* Landing Page */
    body.landing-page .mobile-toggle { display: block; }
    body.landing-page .nav-menu {
        position: fixed; top: var(--header-h); left: 0; width: 100%;
        background: #000; border-bottom: 1px solid var(--border);
        flex-direction: column; padding: 30px; gap: 20px; display: none;
    }
    body.landing-page .nav-menu.active { display: flex; }
    body.landing-page .grid-3, body.landing-page .footer-grid { grid-template-columns: 1fr; text-align: center; }
    body.landing-page .hero-stats { flex-direction: column; gap: 30px; }

    /* Dashboard Page */
    body.dashboard-page { padding-left: 0; } /* Remove sidebar space */
    
    .app-nav { transform: translateX(-100%); box-shadow: 10px 0 50px rgba(0,0,0,0.8); } /* Hide Sidebar */
    .app-nav.active { transform: translateX(0); } /* Slide in Sidebar */
    
    .sidebar-toggle { display: flex; } /* Show Toggle Button */

    .main-container { padding: 80px 20px 20px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .user-pill { margin-left: auto; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* =========================================
   ADMIN MOBILE OVERRIDE (Force Sidebar Drawer)
   ========================================= */
@media (max-width: 900px) {
    
    /* 1. Reset the Bottom Bar styles for Admin */
    .app-nav.admin-mode {
        top: 0 !important; bottom: auto !important; /* Move back to top */
        left: 0 !important;
        width: 260px !important; /* Fixed width sidebar */
        height: 100vh !important; /* Full height */
        flex-direction: column !important;
        padding: 20px !important;
        border-right: 1px solid var(--border);
        transform: translateX(-100%); /* Hide off-screen */
        transition: transform 0.3s ease;
        background: #000 !important;
        align-items: stretch !important; /* Fix alignment */
    }

    /* 2. Show when Active */
    .app-nav.admin-mode.active {
        transform: translateX(0); /* Slide In */
        box-shadow: 10px 0 50px rgba(0,0,0,0.8);
    }

    /* 3. Fix internal layout */
    .app-nav.admin-mode .nav-links {
        flex-direction: column !important; /* Stack vertical */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: 100%;
        justify-content: flex-start !important;
    }

    .app-nav.admin-mode .nav-item {
        flex-direction: row !important; /* Icon next to Text */
        text-align: left !important;
        font-size: 0.9rem !important;
        background: transparent;
    }

    .app-nav.admin-mode .brand {
        display: flex !important; /* Show Logo again */
        margin-bottom: 30px;
    }
    
    .app-nav.admin-mode .menu-label {
        display: block !important; /* Show Labels */
        font-size: 0.7rem; color: #666; margin-top: 15px; margin-bottom: 5px; font-weight: bold;
    }
}
