/* VR180 Platform - Main Stylesheet */
/* Matching Phase 1 VR VOD design: Inter font, dark theme, purple/white palette */

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

:root {
    --bg: #09090b;
    --bg-card: rgba(255,255,255,0.03);
    --bg-card-hover: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --accent: #a855f7;
    --accent-light: #c084fc;
    --accent-dark: #7c3aed;
    --btn-primary: linear-gradient(135deg, #7c3aed, #a855f7);
    --btn-hover: linear-gradient(135deg, #6d28d9, #9333ea);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #eab308;
    --radius: 12px;
    --radius-sm: 8px;
}

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

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(56,189,248,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 0%, rgba(168,85,247,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(124,58,237,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Brand Banner */
.brand-banner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 20px 20px;
}

.brand-text {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
}

/* Page container */
.page {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.page-wide {
    max-width: 1200px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.3s;
}

.card:hover {
    border-color: var(--border-hover);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,0.08);
}

.form-input::placeholder {
    color: var(--text-dim);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    color: #fff;
}

.btn-primary {
    background: var(--btn-primary);
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

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

.btn-secondary {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

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

.btn-danger {
    background: var(--danger);
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85em;
}

.btn-full {
    width: 100%;
}

/* Error message */
.error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9em;
}

.success-msg {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9em;
}

/* Gallery Grid */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.size-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.size-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    text-decoration: none;
}

.size-btn.active, .size-btn:hover {
    background: var(--accent);
    color: #fff;
}

.gallery-grid {
    display: grid;
    gap: 20px;
}

.gallery-grid.small { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.gallery-grid.medium { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.gallery-grid.large { grid-template-columns: repeat(auto-fill, minmax(600px, 1fr)); }

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.video-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(168,85,247,0.15);
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: contain;
    background: #000;
    display: block;
}

.video-info {
    padding: 16px;
}

.video-title {
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 6px;
}

.video-meta {
    font-size: 0.82em;
    color: var(--text-dim);
}

.video-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-res {
    background: rgba(168,85,247,0.15);
    color: var(--accent-light);
}

.badge-spatial {
    background: rgba(56,189,248,0.15);
    color: #38bdf8;
}

/* Video Detail */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 1;
}

.video-player-wrap {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.video-player-wrap video {
    width: 100%;
    max-height: 80vh;
    display: block;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h2 {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.info-box {
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.6;
}

/* User nav bar */
.user-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 16px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.user-nav-info {
    font-size: 0.85em;
    color: var(--text-dim);
}

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

/* Resolution selector */
.res-selector {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.res-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.res-btn.active {
    background: var(--accent);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 2px; }

/* Responsive */
@media (max-width: 768px) {
    .brand-text { font-size: 1.5em; }
    .gallery-grid.medium { grid-template-columns: 1fr; }
    .gallery-grid.large { grid-template-columns: 1fr; }
    .page { padding: 0 12px 40px; }
}
