/* style.css */
/* Premium Design System for CampVDO */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-main: #06040a;
    --bg-card: rgba(15, 11, 28, 0.65);
    --bg-card-hover: rgba(22, 17, 38, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(147, 51, 234, 0.4);
    
    --primary: #9333ea; /* Purple */
    --primary-glow: rgba(147, 51, 234, 0.4);
    --primary-hover: #a855f7;
    
    --secondary: #ec4899; /* Pink */
    --secondary-glow: rgba(236, 72, 153, 0.4);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #6b7280;
    
    --danger: #ef4444;
    --success: #22c55e;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 10% 10%, rgba(147, 51, 234, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 11, 28, 1) 0px, transparent 80%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(6, 4, 10, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 51, 234, 0.6);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Auth Gate Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    text-align: center;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo-glow {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 0 30px var(--primary-glow);
    animation: pulseGlow 3s infinite ease-in-out;
}

.logo-glow svg {
    width: 40px;
    height: 40px;
    color: white;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
    50% { box-shadow: 0 0 40px var(--primary-glow), 0 0 20px var(--secondary-glow); }
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: rgba(255, 255, 255, 0.05);
}

.eye-btn {
    position: absolute;
    right: 14px;
    top: 38px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.eye-btn:hover {
    color: white;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 15px;
    display: none;
    background: rgba(239, 68, 68, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* App Interface Layout */
.app-container {
    display: none; /* Hidden by default until auth */
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(6, 4, 10, 0.7);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    background: linear-gradient(to right, white, var(--primary-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
    -webkit-text-fill-color: initial;
}

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

.user-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.btn-secondary {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Main Dashboard Layout */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Left Pane: Player & Info */
.player-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* The Secure Video Canvas */
.video-player-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

/* Actual YouTube iframe container wrapper */
.youtube-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.youtube-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* THE CLICK BLOCK SHIELD */
.pointer-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    cursor: default;
}

/* FLOATING DYNAMIC WATERMARK */
.secure-watermark {
    position: absolute;
    z-index: 8;
    color: rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    backdrop-filter: blur(1px);
    transition: left 2s ease-in-out, top 2s ease-in-out;
    white-space: nowrap;
}

/* Security Breach Warning Screen */
.security-breach-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    background: rgba(6, 4, 10, 0.98);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

.security-breach-overlay svg {
    width: 64px;
    height: 64px;
    color: var(--danger);
    margin-bottom: 20px;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to { transform: scale(1.1); opacity: 1; }
}

.security-breach-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    margin-bottom: 10px;
}

.security-breach-overlay p {
    color: var(--text-muted);
    max-width: 450px;
}

/* PLAY BUTTON OVERLAY (Center screen play state) */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 7;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.play-overlay:hover {
    background: rgba(0,0,0,0.2);
}

.play-overlay-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: var(--transition);
}

.play-overlay:hover .play-overlay-btn {
    transform: scale(1.1);
    background: var(--primary-hover);
    box-shadow: 0 0 40px var(--primary-glow);
}

.play-overlay-btn svg {
    width: 32px;
    height: 32px;
    color: white;
    margin-left: 4px;
}

/* CUSTOM VIDEO CONTROLS */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    user-select: none;
}

.video-player-container:hover .custom-video-controls,
.video-player-container.controls-active .custom-video-controls {
    transform: translateY(0);
}

.controls-row-top {
    width: 100%;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: height 0.15s ease;
}

.progress-bar-container:hover {
    height: 8px;
}

.progress-filled {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 3px;
    width: 0%;
    position: relative;
}

.progress-handle {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.progress-bar-container:hover .progress-handle {
    transform: translateY(-50%) scale(1);
}

.controls-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-left, .controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: var(--transition);
}

.control-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.control-btn svg {
    width: 22px;
    height: 22px;
}

.time-display {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 0px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    transition: width 0.3s ease;
    cursor: pointer;
}

.volume-container:hover .volume-slider,
.volume-slider:focus {
    width: 70px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
}

/* Video Info Metadata Section */
.video-meta-card {
    padding: 24px;
}

.current-video-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.current-video-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Right Pane: Video Directory List */
.sidebar-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 120px);
}

.sidebar-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    height: 100%;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}

.category-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}

.tab-btn.active {
    background: rgba(147, 51, 234, 0.15);
    color: var(--primary-hover);
    border: 1px solid rgba(147, 51, 234, 0.2);
}

.tab-btn:hover:not(.active) {
    color: white;
    background: rgba(255,255,255,0.03);
}

/* Scrollable Playlist Area */
.playlist-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.video-item-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.video-item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.video-item-card.active {
    background: rgba(147, 51, 234, 0.08);
    border-color: rgba(147, 51, 234, 0.3);
}

.video-item-thumbnail {
    width: 100px;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-item-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
}

.video-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.video-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item-category {
    font-size: 0.75rem;
    color: var(--primary-hover);
    font-weight: 500;
    text-transform: uppercase;
}

.video-item-active-tag {
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 600;
    display: none;
}

.video-item-card.active .video-item-active-tag {
    display: inline;
}

.video-item-card.active .video-item-category {
    display: none;
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-dark);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}
