:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --accent: #e50914;
    --accent-hover: #f40612;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b6b6b;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-hero: linear-gradient(to top, var(--bg-primary) 0%, transparent 60%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    transition: background 0.3s ease;
}

.nav-bar.scrolled {
    background: rgba(10, 10, 10, 0.95);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-signin {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-signin:hover {
    background: var(--accent-hover);
}

/* Slide Menu */
.slide-menu {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background: var(--bg-secondary);
    z-index: 2000;
    transition: left 0.3s ease;
    padding: 80px 30px 30px;
    overflow-y: auto;
}

.slide-menu.open {
    left: 0;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.menu-section {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
}

.menu-section--platform {
    background: rgba(229, 9, 20, 0.06);
}

.menu-section--company {
    background: rgba(255, 255, 255, 0.04);
}

.menu-section--legal {
    background: rgba(100, 140, 180, 0.06);
}

.menu-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s, padding-left 0.2s;
}

.menu-link:hover {
    color: white;
    padding-left: 10px;
}

/* Hero & Main Viewport are now modular and controlled via Detail Overlay */
.opacity-zero {
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: black;
    border: none;
    padding: 15px 35px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-play:hover {
    background: rgba(255, 255, 255, 0.85);
}

.btn-hero-secondary {
    background: rgba(109, 109, 110, 0.7) !important;
    color: white !important;
    border: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.btn-hero-secondary:hover {
    background: rgba(109, 109, 110, 0.45) !important;
}

/* Footer (Restored) */
footer {
    background: var(--bg-secondary);
    padding: 60px 40px 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-social {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: white;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Page content styles (Restored) */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 80px;
}

.page.active {
    display: block;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.page-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.page-text h2 {
    color: white;
    margin: 40px 0 20px;
    font-size: 1.5rem;
}

.page-text p {
    margin-bottom: 20px;
}

.page-text ul {
    margin: 20px 0;
    padding-left: 30px;
}

.page-text li {
    margin-bottom: 10px;
}

/* Auth Modal Styles (Restored) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    width: 100%;
    max-width: 450px;
    padding: 50px;
    border-radius: 8px;
    position: relative;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.auth-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #333;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1rem;
}

.auth-form input::placeholder {
    color: #8c8c8c;
}

.btn-auth-submit {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    background: var(--bg-secondary);
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.social-btns {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-apple {
    background: white;
    color: black;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

/* Netflix-style Cinematic Overlay */
.video-player-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 5000;
    display: none;
    flex-direction: column;
    overflow-y: scroll;
    /* Force scrollability */
    scrollbar-width: none;
}

.video-player-overlay.active {
    display: flex;
}

.detail-header {
    position: relative;
    width: 100%;
    height: 100vh;
    flex-shrink: 0;
}

.detail-video-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* AI Presenter: Strictly < 1/3 Width, 2/3 Height */
.detail-presenter-overlay {
    position: absolute;
    bottom: 5vh;
    right: 2vw;
    width: 30vw;
    /* < 1/3 width */
    height: 60vh;
    /* ~2/3 height */
    z-index: 5;
    pointer-events: none;
}

.detail-presenter-overlay video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.detail-header-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #000 0%, transparent 40%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 20%);
    z-index: 2;
}

/* Playing Indicator */
.detail-header::before {
    content: "PLAYING";
    position: absolute;
    top: 40px;
    left: 40px;
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    z-index: 10;
    border-radius: 2px;
    opacity: 0.8;
}

.detail-close {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 6000;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.detail-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

/* Main Hero Billboard */
.hero {
    position: relative;
    height: 85vh;
    /* Restored for impact */
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #000;
}

.hero-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 1;
    /* Fully visible 3D Illustration */
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 10%, transparent 60%),
        linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 6%;
    max-width: 900px;
    margin-top: 0;
}

.hero-title {
    font-size: 4.5rem;
    /* High impact */
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -2px;
    line-height: 1.05;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    transition: opacity 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    /* Balanced */
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 700px;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: opacity 0.8s ease;
}

/* Minimized Playback UI (Prevents Doubled Hero Feel) */
.detail-content-top {
    position: absolute;
    bottom: 40px;
    left: 40px;
    max-width: 400px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.detail-description {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
    margin-bottom: 15px;
}

.detail-controls {
    display: flex;
    gap: 10px;
}

.btn-mute-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 20;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .video-card-info {
    opacity: 1;
}

.video-card-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.video-card-tags {
    font-size: 0.75rem;
    color: var(--accent);
}

/* Card Fallback Styles */
.video-card img {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    min-height: 100%;
}

.video-card::before {
    content: "INTELLIBOURNE";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    z-index: 0;
    letter-spacing: 2px;
}

/* Article / Slide View Modal - Dark Cinematic Theme */
.content-viewer-modal {
    position: fixed;
    inset: 40px;
    background: #111;
    color: #eee;
    z-index: 7000;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.content-viewer-modal.active {
    display: flex;
}

.viewer-header {
    padding: 20px 40px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-body {
    flex: 1;
    overflow-y: auto;
    padding: 60px 100px;
    font-family: 'Inter', serif;
}

.viewer-article h1 {
    font-size: 3rem;
    margin-bottom: 40px;
}

.viewer-article p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.viewer-slides {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.slide-item {
    background: #f8f8f8;
    padding: 60px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
}

/* Browser / Library Section */
.detail-browse {
    padding: 80px 4%;
    background: var(--bg-primary);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.row-section {
    margin-bottom: 60px;
}

.row-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.video-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.video-card {
    flex: 0 0 320px;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
}

.video-card:hover {
    transform: scale(1.05);
    z-index: 20;
}

/* Presentation Player Logic */
.presentation-player {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: 1fr auto;
    gap: 20px;
    height: 100%;
}

.slide-visual {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    grid-column: 1 / 2;
    border: 1px solid rgba(255,255,255,0.05);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    z-index: 2;
}

.slide-overlay h2 {
    font-size: 3rem;
    margin-bottom: 30px;
    color: var(--accent);
    font-weight: 800;
}

.slide-overlay ul {
    list-style: none;
}

.slide-overlay li {
    font-size: 1.4rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.slide-overlay li::before {
    content: "→";
    color: var(--accent);
    font-weight: 900;
}

.presenter-box {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.presentation-controls {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding-top: 10px;
}

#slide-count {
    font-family: 'Orbitron', monospace;
    color: var(--accent);
    letter-spacing: 2px;
}
/* User Panel - Enhanced for visibility */
.user-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98) !important;
    backdrop-filter: blur(15px);
    z-index: 2100;
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0,0,0,0.8);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.user-panel.open {
    right: 0;
}

.user-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.user-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.user-panel-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.user-panel-section {
    margin-bottom: 30px;
}

.user-panel-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.btn-panel-action {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-panel-action:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}
