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

:root {
    --primary: #ff4444;
    --primary-dark: #cc0000;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.1);
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ LANDING PAGE ============ */
.landing {
    min-height: 100vh;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,68,68,0.1)" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="rgba(255,68,68,0.1)" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="rgba(255,68,68,0.1)" stroke-width="0.5"/></svg>');
    background-size: 300px 300px;
    opacity: 0.5;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #ff4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Status Badge */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.status-live {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid var(--primary);
}

.status-offline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

.status-live .status-dot {
    background: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.status-offline .status-dot {
    background: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 160px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary.pulse {
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 68, 68, 0); }
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Device Support */
.device-support {
    padding: 4rem 2rem;
    background: var(--bg-card);
    text-align: center;
}

.device-support h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.devices {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.device-icon {
    font-size: 2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============ WATCH PAGE ============ */
.watch-page {
    overflow: hidden;
}

#player-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #000;
}

#player-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#player-canvas:active {
    cursor: grabbing;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 50;
}

.overlay.hidden {
    display: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.offline-content {
    text-align: center;
    padding: 2rem;
}

.offline-content h2 {
    margin-bottom: 0.5rem;
}

.offline-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Controls Overlay */
#controls-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

#controls-overlay > * {
    pointer-events: auto;
}

#controls-overlay.vr-mode {
    display: none;
}

/* Top Bar */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.back-btn {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.viewer-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Drag Hint */
.drag-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.drag-hint.visible {
    opacity: 1;
}

.drag-hint p {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
}

/* Bottom Bar */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.control-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

.control-btn:disabled {
    cursor: not-allowed;
}

.control-btn.active {
    background: var(--primary);
}

.zoom-control {
    flex: 1;
    max-width: 200px;
    margin: 0 1rem;
}

#zoom-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

#zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Play Button (for autoplay blocked) */
.play-button {
    font-size: 1.5rem;
    padding: 1.5rem 3rem;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .top-bar {
        padding: 0.75rem;
    }

    .bottom-bar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .zoom-control {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0.5rem 0 0 0;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .top-bar, .bottom-bar {
        padding: 0.5rem 1rem;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }
}
