/* CineSync - Netflix Style Watch Party */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --bg: #0f0f0f;
    --bg-light: #141414;
    --bg-lighter: #1a1a1a;
    --surface: #222;
    --surface-hover: #333;
    --text: #fff;
    --text-muted: #aaa;
    --text-dim: #666;
    --border: #333;
    --success: #2ecc71;
    --warning: #f1c40f;
    --accent-purple: #8e44ad;
    --accent-pink: #e84393;
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.7);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== ANTI-CRACK OVERLAY ===== */
#anticrack-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}
#anticrack-overlay.active { display: flex; }
#anticrack-overlay h1 { color: var(--primary); font-size: 48px; }
#anticrack-overlay p { color: var(--text-muted); font-size: 18px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===== HEADER ===== */
.header {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, transparent 100%);
    padding: 16px 40px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ff4757);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -1px;
}

.logo-icon {
    -webkit-text-fill-color: initial;
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(229,9,20,0.5));
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.user-badge {
    background: var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(229,9,20,0.3);
}

.user-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(229,9,20,0.5);
}

/* ===== ROOM BAR ===== */
.room-bar {
    background: var(--bg-lighter);
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.room-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.room-code {
    background: var(--surface);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-weight: 700;
    letter-spacing: 1px;
}

.room-code:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.online-users {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--success);
}

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

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

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(229,9,20,0.3);
}

.btn-primary:hover {
    background: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(229,9,20,0.5);
}

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

.btn-secondary:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.btn-cheat {
    background: linear-gradient(135deg, var(--accent-purple), #9b59b6);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.btn-cheat::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.btn-cheat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(142, 68, 173, 0.4);
}

.btn-cheat:hover::before {
    left: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface);
    color: var(--text);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - 130px);
}

/* ===== VIDEO SECTION ===== */
.video-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
}

.video-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #000;
}

.video-wrapper {
    width: 100%;
    height: 100%;
    max-width: 1400px;
    position: relative;
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.85);
    z-index: 10;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(5px);
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-screen {
    text-align: center;
    padding: 40px;
    max-width: 600px;
}

.start-screen h2 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 700;
}

.start-screen p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 15px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.input-group input,
.input-group select {
    flex: 1;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.1);
}

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

.source-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.source-tab {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.source-tab:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.source-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== CHAT SECTION ===== */
.chat-section {
    width: 380px;
    background: var(--bg-light);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-lighter);
}

.chat-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.message {
    max-width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.message-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.message-name {
    font-size: 12px;
    font-weight: 600;
}

.message-time {
    font-size: 10px;
    color: var(--text-dim);
}

.message-body {
    background: var(--surface);
    padding: 10px 14px;
    border-radius: var(--radius);
    border-top-left-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    color: var(--text);
}

.message.own {
    align-self: flex-end;
}

.message.own .message-body {
    background: var(--primary);
    border-top-left-radius: var(--radius);
    border-top-right-radius: 4px;
    color: #fff;
}

.message.own .message-name {
    color: var(--primary);
}

.message.system {
    align-self: center;
}

.message.system .message-body {
    background: transparent;
    color: var(--text-dim);
    font-size: 12px;
    text-align: center;
    padding: 6px;
}

.message.love .message-body {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    font-size: 20px;
    padding: 14px;
    text-align: center;
}

/* ===== CHAT INPUT ===== */
.chat-input-area {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-lighter);
}

.chat-input {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 10px 18px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.1);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    font-size: 16px;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(229,9,20,0.4);
}

.emoji-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.1);
    background: var(--surface-hover);
}

/* ===== CHEAT MENU ===== */
.cheat-menu {
    position: absolute;
    top: 50px;
    right: 10px;
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
}

.cheat-menu.show { display: flex; }

.cheat-item {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.cheat-item:hover {
    background: var(--surface);
    transform: translateX(4px);
}

.cheat-item .cheat-icon {
    font-size: 20px;
}

/* ===== CHEAT EFFECTS ===== */
.cheat-effect {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.cheat-effect.active { display: block; }

.heart-rain {
    position: absolute;
    font-size: 24px;
    animation: heartFall linear forwards;
    filter: drop-shadow(0 0 5px rgba(255,0,0,0.5));
}

@keyframes heartFall {
    0% { transform: translateY(-100px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.cheat-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    z-index: 10000;
    max-width: 420px;
    width: 90%;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-lg);
}

.cheat-popup.show {
    transform: translate(-50%, -50%) scale(1);
}

.cheat-popup .emoji-big {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cheat-popup h3 {
    font-size: 26px;
    margin-bottom: 12px;
    color: var(--primary);
}

.cheat-popup p {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
}

.reaction-float {
    position: fixed;
    font-size: 40px;
    animation: floatUp 2.5s ease-out forwards;
    pointer-events: none;
    z-index: 9999;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    50% { opacity: 1; transform: translateY(-100px) scale(1.3); }
    100% { opacity: 0; transform: translateY(-250px) scale(0.5); }
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.modal-overlay.hidden { display: none; }

.modal {
    background: var(--bg-lighter);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.4s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.6;
}

.modal input {
    width: 100%;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.modal input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(229,9,20,0.1);
}

.modal .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-lighter);
    border-left: 4px solid var(--primary);
    padding: 16px 22px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
    max-width: 320px;
    border: 1px solid var(--border);
    border-left-width: 4px;
}

.toast.show { transform: translateX(0); }

.toast-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--text); }
.toast-msg { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    height: 3px;
    background: var(--surface);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(229,9,20,0.5);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    display: none;
    padding: 8px 20px;
    font-size: 12px;
    color: var(--text-dim);
    font-style: italic;
    background: var(--bg-lighter);
    border-top: 1px solid var(--border);
}

.typing-indicator.show { display: block; }

/* ===== SYNC INDICATOR ===== */
.sync-indicator {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.7);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.sync-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.sync-dot.syncing {
    background: var(--warning);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== SURPRISE BUTTON ===== */
.surprise-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff4757);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
    transition: var(--transition);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
    30% { transform: scale(1.1); }
    40% { transform: scale(1); }
}

.surprise-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.6);
    animation: none;
}

.surprise-btn:active { transform: scale(0.95); }

/* ===== RAW VIDEO ROOM ===== */
.raw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.raw-card {
    background: var(--bg-lighter);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.raw-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.raw-card-thumb {
    width: 100%;
    height: 160px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.raw-card-thumb::after {
    content: '▶';
    position: absolute;
    font-size: 40px;
    color: var(--primary);
    opacity: 0;
    transition: var(--transition);
    background: rgba(0,0,0,0.6);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.raw-card:hover .raw-card-thumb::after {
    opacity: 1;
}

.raw-card-info {
    padding: 16px;
}

.raw-card-info h4 {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 600;
}

.raw-card-info p {
    font-size: 12px;
    color: var(--text-dim);
}

.raw-url-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
}

/* ===== LANDING PAGE ===== */
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    background: 
        radial-gradient(ellipse at top, rgba(229,9,20,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(142,68,173,0.1) 0%, transparent 50%);
}

.landing h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.landing p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.room-selector {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.room-card {
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    width: 280px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.room-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.room-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.room-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.room-card p {
    font-size: 13px;
    color: var(--text-dim);
    margin: 0;
}

.join-section {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.join-section input {
    padding: 14px 20px;
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 15px;
    width: 200px;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.join-section input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .chat-section { width: 320px; }
    .landing h1 { font-size: 42px; }
}

@media (max-width: 768px) {
    .header { padding: 12px 20px; }
    .nav-links { display: none; }
    .main-layout { flex-direction: column; }
    .chat-section { width: 100%; height: 320px; border-left: none; border-top: 1px solid var(--border); }
    .room-bar { flex-direction: column; gap: 12px; padding: 12px 20px; }
    .room-actions { flex-wrap: wrap; justify-content: center; }
    .landing h1 { font-size: 36px; }
    .room-selector { flex-direction: column; align-items: center; }
    .video-section { height: 50vh; }
}

@media (max-width: 480px) {
    .landing h1 { font-size: 28px; }
    .start-screen h2 { font-size: 24px; }
    .input-group { flex-direction: column; }
    .modal { padding: 24px; }
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== VIDEO SOURCE SELECTOR ===== */
.source-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.source-btn {
    padding: 10px 20px;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.source-btn:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.source-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(229,9,20,0.1);
}

/* ===== RAW VIDEO PLAYER ===== */
.raw-player-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.raw-player-container video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* ===== GITHUB RAW INPUTS ===== */
.raw-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.raw-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.raw-input-row input {
    flex: 1;
}

.raw-input-row .btn {
    white-space: nowrap;
}
