/* ==========================================================================
   BE VUE: MAIN CSS
   Design System: Tactile Cyber-Editorial
   ========================================================================== */

:root {
    /* Foundation Colors */
    --bg-base: #121212;
    --bg-player: #000000;
    --border-subtle: #333333;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    
    /* Vue Tier Accents */
    --accent-free: #ffffff;
    --accent-lite: #ff9f2e;
    --accent-blue: #1a73e8;
    --accent-premium: #ff3b30;
    --accent-bwp: #ffd700; /* Pula Gold for tipping */
    
    /* Typography */
    --font-functional: system-ui, -apple-system, Roboto, sans-serif;
    --font-editorial: 'Arial Black', Impact, sans-serif; /* Brutalist Header Font */
    
    /* Physics & Micro-Interactions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 12px;
    --border-radius-sm: 8px;
    
    /* Spacing */
    --nav-height: 70px;
}

/* ==========================================================================
   RESET & CORE PHYSICS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-functional);
    /* PWA Physics: Prevents pull-to-refresh & gives native bounce */
    overscroll-behavior-y: contain; 
    -webkit-tap-highlight-color: transparent;
    padding-bottom: var(--nav-height); /* Clear space for bottom nav */
    padding-top: var(--nav-height); /* Clear space for top nav */
}

/* Typography Classes */
.text-editorial {
    font-family: var(--font-editorial);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.text-subtle {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================================================
   THE BENTO BOX GRID ARCHITECTURE
   ========================================================================== */
.app-container {
    padding: 16px;
    display: grid;
    gap: 16px;
}

.bento-card {
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    transition: transform var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Hardware-Accelerated Tactile Feedback */
.bento-card.interactive:active, 
button:active {
    transform: scale(0.97);
}

.btn-press:active {
    box-shadow: 0 0 12px rgba(0, 208, 132, 0.25);
    border-color: var(--accent-lite);
}

/* Dynamic Neon Glow Utility (GPU optimized) */
.glow-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   NATIVE BUNNY PLAYER WRAPPER
   ========================================================================== */
.bunny-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-player);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Forces the injected Bunny iframe to fit perfectly */
.bunny-player-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* ==========================================================================
   LIVE HUB & SOCIAL CHAT
   ========================================================================== */
.live-hub-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--nav-height) - 32px); /* Full height minus padding & nav */
    gap: 12px;
}

.chat-module {
    flex-grow: 1;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   TIPPING ENGINE (PULA)
   ========================================================================== */
.tipping-module {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    /* Hide scrollbar for clean UI */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.tipping-module::-webkit-scrollbar { 
    display: none; 
}

.tip-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-bwp);
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.tip-btn:active {
    background: var(--accent-bwp);
    color: var(--bg-base);
}

/* ==========================================================================
   BOTTOM-HEAVY NAVIGATION
   ========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--bg-base);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color var(--transition-fast);
}

.nav-item.active {
    color: var(--accent-lite);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ==========================================================================
   DATA DIAL (TACTILE RANGE SLIDER)
   ========================================================================== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 16px 0;
}

/* The Track */
input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: var(--border-subtle);
    border-radius: var(--border-radius-sm);
}

input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--border-subtle);
    border-radius: var(--border-radius-sm);
}

/* The Thumb (The Dial) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text-primary);
    margin-top: -9px;
    transition: transform var(--transition-fast);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text-primary);
    transition: transform var(--transition-fast);
    border: none;
}

/* Thumb Active State (Hardware-Accelerated Tactile Feedback) */
input[type="range"]:active::-webkit-slider-thumb,
input[type="range"]:active::-moz-range-thumb {
    transform: scale(0.85);
}

/* Label Flexbox */
.dial-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ==========================================================================
   GLOBAL UI: HEADER, OVERLAY, SIDEBAR
   ========================================================================== */

/* Frosted Glass Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
}

/* Full-Screen Dimming Overlay */
.glass-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.glass-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   SPLASH SCREEN & AUTHENTICATION
   ========================================================================== */

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #121212 0%, #0a1f18 50%, #1a0808 100%);
    transition: opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.splash-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.splash-logo {
    font-size: 2.5rem;
    letter-spacing: 2px;
    background: -webkit-linear-gradient(45deg, var(--accent-lite), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-subtle);
    border-top: 4px solid var(--accent-lite);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Forms */
.form-group {
    margin-bottom: 16px;
    width: 100%;
}

.auth-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    color: white;
    width: 100%;
}

.auth-btn {
    background: var(--accent-lite);
    color: #000;
    font-weight: bold;
    padding: 14px;
    border-radius: 8px;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-btn:active {
    transform: scale(0.97);
}

/* Slide-out Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-base);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-subtle);
    padding: 24px 16px;
}

.sidebar-menu.active {
    transform: translateX(0);
}

/* Google-Style Floating User Card */
.user-dropdown-card {
    position: absolute;
    top: calc(var(--nav-height) + 8px);
    right: 16px;
    width: calc(100vw - 32px);
    max-width: 320px;
    background: var(--bg-base);
    z-index: 1002;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast);
}

.user-dropdown-card.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   PREMIUM PRICING TABLES
   ========================================================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
}

.pricing-card.premium {
    border: 1px solid var(--accent-lite);
    box-shadow: 0 0 20px rgba(255, 159, 46, 0.1);
}

.price-tag {
    font-size: 2.5rem;
    font-family: var(--font-editorial);
    margin: 16px 0;
    color: var(--text-primary);
}

.price-tag .currency {
    font-size: 1rem;
    color: var(--text-secondary);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   ADMIN COMMAND CENTER
   ========================================================================== */

.admin-layout { display: flex; flex-direction: column; gap: 16px; min-height: 100vh; }
.admin-sidebar { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.admin-sidebar-nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 8px; }
.admin-sidebar-nav::-webkit-scrollbar { display: none; } /* Hide scrollbar */

@media (min-width: 768px) {
    .admin-layout { 
        flex-direction: row; 
        padding-top: 24px; 
    }
    
    .admin-sidebar { 
        width: 250px; 
        flex-shrink: 0; 
    }
    
    .admin-sidebar-nav { 
        flex-direction: column; 
        overflow-x: visible; 
    }
}

/* Creator Dashboard Progress Bars */
.progress-container { width: 100%; height: 12px; background-color: var(--border-subtle); border-radius: 6px; overflow: hidden; margin: 12px 0; }
.progress-bar { height: 100%; background-color: var(--accent-lite); border-radius: 6px; transition: width 0.5s ease-out; }
.progress-bar.warning { background-color: var(--accent-premium); } /* Turns red when near cap */

/* ==========================================================================
   CINEMATIC DETAILS MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Mobile: slide up from bottom */
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    width: 100%;
    max-width: 800px;
    background: var(--bg-base);
    border-radius: 24px 24px 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
/* Desktop: Center it like a standard dialog */
@media (min-width: 768px) {
    .modal-overlay { align-items: center; padding: 24px; }
    .modal-content { border-radius: var(--border-radius-lg); border-bottom: 1px solid var(--border-subtle); transform: scale(0.95); max-height: 85vh; }
    .modal-overlay.active .modal-content { transform: scale(1); }
}
.modal-hero {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    position: relative;
}
.modal-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-base) 0%, transparent 60%);
}
.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(18, 18, 18, 0.6);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

/* ==========================================================================
   CINEMATIC ACCOUNT HUB STYLING
   ========================================================================== */
.profile-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .profile-layout-grid {
        grid-template-columns: 260px 1fr;
        padding: 24px;
    }
}

.profile-sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
    -webkit-overflow-scrolling: touch;
}

.profile-sidebar-nav::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .profile-sidebar-nav {
        flex-direction: column;
        border-bottom: none;
        border-right: 1px solid var(--border-subtle);
        padding-right: 20px;
        padding-bottom: 0;
        overflow-x: visible;
    }
}

.profile-nav-btn {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    padding: 14px 18px;
    font-family: var(--font-functional);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
    width: 100%;
}

.profile-nav-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.profile-nav-btn.active {
    color: #000000;
    background: var(--accent-lite);
    border-color: var(--accent-lite);
    font-weight: bold;
    box-shadow: 0 0 16px rgba(255, 159, 46, 0.2);
}

.profile-workspace-canvas {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 400px;
}

.matrix-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.matrix-row:last-child {
    border-bottom: none;
}
