/* ============================================
   PartyWatch — Premium Dark Theme
   ============================================ */

/* ─── CSS Variables ─── */
:root {
    /* Background */
    --pw-bg-deep: #06060f;
    --pw-bg-dark: #0a0a1a;
    --pw-bg-card: rgba(255, 255, 255, 0.04);
    --pw-bg-card-hover: rgba(255, 255, 255, 0.07);

    /* Accent Colors */
    --pw-primary: #7c3aed;
    --pw-primary-light: #a78bfa;
    --pw-primary-glow: rgba(124, 58, 237, 0.4);
    --pw-secondary: #06b6d4;
    --pw-secondary-light: #67e8f9;
    --pw-secondary-glow: rgba(6, 182, 212, 0.4);
    --pw-accent: #f472b6;

    /* Status */
    --pw-success: #22c55e;
    --pw-success-glow: rgba(34, 197, 94, 0.4);
    --pw-danger: #ef4444;
    --pw-danger-glow: rgba(239, 68, 68, 0.3);
    --pw-warning: #f59e0b;

    /* Text */
    --pw-text: #f1f5f9;
    --pw-text-muted: #94a3b8;
    --pw-text-dim: #64748b;

    /* Borders */
    --pw-border: rgba(255, 255, 255, 0.08);
    --pw-border-light: rgba(255, 255, 255, 0.12);

    /* Glass */
    --pw-glass-bg: rgba(15, 15, 40, 0.6);
    --pw-glass-border: rgba(255, 255, 255, 0.1);
    --pw-glass-blur: 20px;

    /* Fonts */
    --pw-font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --pw-font-display: 'Outfit', 'Inter', system-ui, sans-serif;

    /* Spacing */
    --pw-radius: 16px;
    --pw-radius-sm: 10px;
    --pw-radius-lg: 24px;

    /* Transitions */
    --pw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--pw-font-body);
    background: var(--pw-bg-deep);
    color: var(--pw-text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pw-font-display);
}

::selection {
    background: var(--pw-primary);
    color: white;
}

/* ─── Animated Background Particles ─── */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(244, 114, 182, 0.05) 0%, transparent 50%);
    animation: bgShift 20s ease-in-out infinite alternate;
}

.bg-particles::before,
.bg-particles::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
}

.bg-particles::before {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    animation-duration: 20s;
}

.bg-particles::after {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: 10%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    animation-duration: 25s;
    animation-delay: -5s;
}

@keyframes bgShift {
    0%   { opacity: 1; }
    50%  { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(30px, -30px) scale(1.05); }
    50%      { transform: translate(-20px, 20px) scale(0.95); }
    75%      { transform: translate(10px, -10px) scale(1.02); }
}

/* ─── Navbar ─── */
.pw-navbar {
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(var(--pw-glass-blur));
    -webkit-backdrop-filter: blur(var(--pw-glass-blur));
    border-bottom: 1px solid var(--pw-border);
    position: relative;
    z-index: 100;
    padding: 0.8rem 0;
}

.pw-brand {
    font-family: var(--pw-font-display);
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--pw-text) !important;
    text-decoration: none;
    transition: var(--pw-transition);
}

.pw-brand i {
    font-size: 1.6rem;
    color: var(--pw-primary-light);
    filter: drop-shadow(0 0 8px var(--pw-primary-glow));
}

.pw-brand:hover {
    transform: translateY(-1px);
}

.pw-brand:hover i {
    color: var(--pw-secondary-light);
}

.pw-version {
    font-size: 0.75rem;
    color: var(--pw-text-dim) !important;
    letter-spacing: 1px;
}

/* ─── Main Content ─── */
.pw-main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 140px);
    padding-bottom: 2rem;
}

/* ─── Hero Section ─── */
.pw-hero {
    padding: 4rem 0 2rem;
}

.pw-hero-title {
    font-family: var(--pw-font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}

.pw-gradient-text {
    background: linear-gradient(135deg, var(--pw-primary-light) 0%, var(--pw-secondary-light) 50%, var(--pw-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pw-hero-subtitle {
    font-size: 1.15rem;
    color: var(--pw-text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── Glass Cards ─── */
.pw-glass-card {
    background: var(--pw-glass-bg);
    backdrop-filter: blur(var(--pw-glass-blur));
    -webkit-backdrop-filter: blur(var(--pw-glass-blur));
    border: 1px solid var(--pw-glass-border);
    border-radius: var(--pw-radius-lg);
    padding: 2rem;
    transition: var(--pw-transition);
    animation: fadeInUp 0.6s ease-out both;
}

.pw-glass-card:hover {
    background: var(--pw-bg-card-hover);
    border-color: var(--pw-border-light);
    transform: translateY(-2px);
}

.pw-card-share {
    animation-delay: 0.1s;
}

.pw-card-watch {
    animation-delay: 0.25s;
}

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

/* ─── Card Header Icons ─── */
.pw-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
}

.pw-card-share .pw-card-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(124, 58, 237, 0.05));
    color: var(--pw-primary-light);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.pw-card-watch .pw-card-icon {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.05));
    color: var(--pw-secondary-light);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.pw-card-title {
    font-family: var(--pw-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pw-card-desc {
    color: var(--pw-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ─── Form Inputs ─── */
.pw-form .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--pw-text-muted);
    margin-bottom: 0.4rem;
}

.pw-input-group {
    position: relative;
}

.pw-input-group > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pw-text-dim);
    font-size: 0.95rem;
    z-index: 2;
    transition: var(--pw-transition);
}

.pw-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--pw-border) !important;
    border-radius: var(--pw-radius-sm) !important;
    color: var(--pw-text) !important;
    padding: 0.7rem 1rem 0.7rem 2.6rem !important;
    font-size: 0.95rem;
    transition: var(--pw-transition);
}

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

.pw-input:focus {
    border-color: var(--pw-primary) !important;
    box-shadow: 0 0 0 3px var(--pw-primary-glow) !important;
    background: rgba(255, 255, 255, 0.07) !important;
}

.pw-input:focus + i,
.pw-input-group:focus-within > i {
    color: var(--pw-primary-light);
}

/* ─── Buttons ─── */
.pw-btn {
    font-family: var(--pw-font-display);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--pw-radius-sm);
    border: none;
    font-size: 0.95rem;
    transition: var(--pw-transition);
    position: relative;
    overflow: hidden;
}

.pw-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: var(--pw-transition);
}

.pw-btn:hover::after {
    opacity: 1;
}

.pw-btn-primary {
    background: linear-gradient(135deg, var(--pw-primary), #9333ea);
    color: white;
    box-shadow: 0 4px 20px var(--pw-primary-glow);
}

.pw-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--pw-primary-glow);
    color: white;
}

.pw-btn-secondary {
    background: linear-gradient(135deg, var(--pw-secondary), #0891b2);
    color: white;
    box-shadow: 0 4px 20px var(--pw-secondary-glow);
}

.pw-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--pw-secondary-glow);
    color: white;
}

.pw-btn-danger {
    background: linear-gradient(135deg, var(--pw-danger), #dc2626);
    color: white;
    box-shadow: 0 4px 15px var(--pw-danger-glow);
}

.pw-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--pw-danger-glow);
    color: white;
}

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

.pw-btn-outline:hover {
    background: var(--pw-bg-card);
    border-color: var(--pw-primary);
    color: var(--pw-text);
}

.pw-btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.pw-btn-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--pw-border);
    color: var(--pw-text);
    font-size: 1.2rem;
    transition: var(--pw-transition);
    backdrop-filter: blur(10px);
}

.pw-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

/* ─── Features Bar ─── */
.pw-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--pw-text-dim);
    font-size: 0.8rem;
    font-weight: 500;
    animation: fadeInUp 0.6s ease-out both;
    animation-delay: 0.4s;
}

.pw-feature i {
    font-size: 1.5rem;
    color: var(--pw-primary-light);
    opacity: 0.7;
}

/* ─── Room Section ─── */
.pw-room-section {
    padding: 1.5rem 0;
}

/* ─── Video Container ─── */
.pw-video-container {
    position: relative;
    background: #000; /* Fondo negro profundo */
    border: none; /* Quitamos el marco o borde */
    border-radius: var(--pw-radius-lg);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9; /* Obliga al contenedor a tener proporción de pantalla ancha */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Sombra elegante en vez de borde */
}

.pw-video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* En móviles: muestra el video completo sin recortar */
    border-radius: var(--pw-radius-lg);
}

/* En pantallas grandes (PC) usar cover para llenar sin bordes */
@media (min-width: 992px) {
    .pw-video {
        object-fit: cover;
    }
}

/* Video Placeholder */
.pw-video-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--pw-text-muted);
}

.pw-video-placeholder i {
    font-size: 4rem;
    color: var(--pw-primary-light);
    opacity: 0.5;
    margin-bottom: 1rem;
    display: block;
}

.pw-video-placeholder h3 {
    font-size: 1.5rem;
    color: var(--pw-text);
    margin-bottom: 0.5rem;
}

.pw-video-placeholder p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Video Overlay */
.pw-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* Solo aplicar hover automático en computadoras con mouse */
@media (hover: hover) {
    .pw-video-container:hover .pw-video-overlay {
        opacity: 1;
    }
}

/* En móviles y al hacer click, se controla por esta clase */
.pw-video-container.show-controls .pw-video-overlay {
    opacity: 1;
}

.pw-video-controls {
    display: flex;
    gap: 0.5rem;
}

/* Live Badge */
.pw-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--pw-font-display);
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

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

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

.pw-stream-info {
    position: absolute;
    bottom: 1rem;
    left: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--pw-text-muted);
}

/* ─── Video Ended Overlay ─── */
.pw-video-ended {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(6, 6, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 20;
    text-align: center;
    padding: 2rem;
}

.pw-video-ended i {
    font-size: 4rem;
    color: var(--pw-text-dim);
    margin-bottom: 1rem;
}

.pw-video-ended h3 {
    color: var(--pw-text);
    margin-bottom: 0.5rem;
}

.pw-video-ended p {
    color: var(--pw-text-muted);
    margin-bottom: 1.5rem;
}

/* ─── Sidebar Cards ─── */
.pw-sidebar-card {
    padding: 1.2rem 1.4rem;
    border-radius: var(--pw-radius);
}

.pw-sidebar-card:hover {
    transform: none;
}

.pw-sidebar-title {
    font-family: var(--pw-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pw-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Room Info */
.pw-room-info label {
    display: block;
    font-size: 0.75rem;
    color: var(--pw-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.pw-room-info p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

/* Room Code Display */
.pw-code-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pw-code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--pw-primary-light);
    text-shadow: 0 0 20px var(--pw-primary-glow);
}

.pw-code-small {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--pw-secondary-light);
}

.pw-btn-copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--pw-border);
    color: var(--pw-text-muted);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    transition: var(--pw-transition);
}

.pw-btn-copy:hover {
    background: var(--pw-primary);
    border-color: var(--pw-primary);
    color: white;
}

.pw-btn-copy.copied {
    background: var(--pw-success) !important;
    border-color: var(--pw-success) !important;
    color: white !important;
}

/* ─── Status Badges ─── */
.pw-badge {
    font-family: var(--pw-font-display);
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.pw-badge-waiting {
    background: rgba(245, 158, 11, 0.15);
    color: var(--pw-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pw-badge-live {
    background: rgba(34, 197, 94, 0.15);
    color: var(--pw-success);
    border: 1px solid rgba(34, 197, 94, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

.pw-badge-ended {
    background: rgba(239, 68, 68, 0.15);
    color: var(--pw-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pw-badge-count {
    background: var(--pw-primary);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    min-width: 24px;
    text-align: center;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ─── Viewer List ─── */
.pw-viewer-list {
    max-height: 250px;
    overflow-y: auto;
}

.pw-viewer-list::-webkit-scrollbar {
    width: 4px;
}

.pw-viewer-list::-webkit-scrollbar-track {
    background: transparent;
}

.pw-viewer-list::-webkit-scrollbar-thumb {
    background: var(--pw-border-light);
    border-radius: 4px;
}

.pw-viewer-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.3rem;
    transition: var(--pw-transition);
}

.pw-viewer-item:hover {
    background: var(--pw-bg-card);
}

.pw-viewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.pw-viewer-name {
    font-size: 0.85rem;
    font-weight: 500;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pw-viewer-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pw-viewer-status.watching {
    background: var(--pw-success);
    box-shadow: 0 0 6px var(--pw-success-glow);
}

.pw-viewer-status.connecting {
    background: var(--pw-warning);
    animation: livePulse 1.5s ease-in-out infinite;
}

.pw-viewer-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--pw-text-dim);
}

.pw-viewer-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

/* ─── Connection Steps (Viewer) ─── */
.pw-connecting-anim {
    margin-bottom: 1.5rem;
}

.pw-connection-steps {
    max-width: 300px;
    margin: 1.5rem auto 0;
    text-align: left;
}

.pw-step {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--pw-text-dim);
    transition: var(--pw-transition);
}

.pw-step.active {
    color: var(--pw-success);
}

.pw-step.active i {
    color: var(--pw-success);
}

.pw-step.pending {
    color: var(--pw-warning);
}

/* ─── Connection Info ─── */
.pw-connection-info {
    font-size: 0.85rem;
    color: var(--pw-text-muted);
}

.pw-conn-status, .pw-conn-type {
    font-weight: 500;
    font-size: 0.8rem;
}

/* ─── Toast (Bootstrap Override) ─── */
.toast {
    background: var(--pw-glass-bg) !important;
    backdrop-filter: blur(var(--pw-glass-blur));
    border: 1px solid var(--pw-border) !important;
    border-radius: var(--pw-radius-sm) !important;
    color: var(--pw-text) !important;
}

.toast.bg-danger {
    border-color: var(--pw-danger) !important;
}

.toast.bg-success {
    border-color: var(--pw-success) !important;
}

/* ─── Glass Alert ─── */
.pw-glass-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: var(--pw-radius-sm);
    backdrop-filter: blur(10px);
}

/* ─── Footer ─── */
.pw-footer {
    position: relative;
    z-index: 1;
    padding: 1.5rem 0;
    border-top: 1px solid var(--pw-border);
    color: var(--pw-text-dim);
    font-size: 0.8rem;
}

.pw-footer i {
    color: var(--pw-primary-light);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--pw-bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--pw-border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--pw-text-dim);
}

/* ─── Responsive ─── */
@media (max-width: 991.98px) {
    /* Tablet adjustments */
    .pw-hero {
        padding: 2.5rem 0 1.5rem;
    }

    .pw-hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .pw-video-container {
        margin-bottom: 1.5rem;
    }

    .pw-sidebar-card {
        padding: 1.2rem;
    }

    .pw-room-section .row {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    /* Large mobile adjustments */
    .pw-glass-card {
        padding: 1.5rem;
    }

    .pw-card-title {
        font-size: 1.35rem;
    }

    .pw-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    /* Small mobile adjustments */
    .pw-hero {
        padding: 1.5rem 0 1rem;
    }

    .pw-hero-subtitle {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .pw-glass-card {
        padding: 1.25rem;
        border-radius: var(--pw-radius);
    }

    .pw-code {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .pw-video-container {
        border-radius: var(--pw-radius);
    }

    .pw-video-placeholder {
        padding: 1.5rem;
    }

    .pw-video-placeholder h3 {
        font-size: 1.25rem;
    }

    .pw-video-placeholder i {
        font-size: 3rem;
    }

    .pw-btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .pw-feature {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .pw-feature i {
        font-size: 1.25rem;
    }
}

/* ─── Utility: Fade In Animation ─── */
.pw-fade-in {
    animation: fadeInUp 0.5s ease-out both;
}

/* ─── Share Tips ─── */
.pw-share-tip {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.pw-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    padding: 0.7rem 1rem;
    border-radius: var(--pw-radius-sm);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--pw-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.pw-tip-box i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.9rem !important;
    opacity: 1 !important;
}

.pw-tip-box-subtle {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--pw-border);
    color: var(--pw-text-dim);
    font-size: 0.78rem;
}

.pw-tip-box-subtle i {
    color: var(--pw-text-dim);
}

/* ============================================
   NEW FEATURES
   ============================================ */

/* ─── Emoji Reactions ─── */
.pw-reactions-bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem;
    background: var(--pw-glass-bg);
    backdrop-filter: blur(var(--pw-glass-blur));
    border: 1px solid var(--pw-glass-border);
    border-radius: 50px;
    margin-top: 0.75rem;
}

.pw-reaction-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--pw-transition);
}

.pw-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--pw-border-light);
    transform: scale(1.25);
}

.pw-reaction-btn:active {
    transform: scale(0.9);
}

.pw-floating-emoji {
    position: absolute;
    bottom: 60px;
    font-size: 2rem;
    pointer-events: none;
    z-index: 15;
    animation: floatUp 2s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

@keyframes floatUp {
    0%   { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
    50%  { opacity: 1; transform: translateY(-120px) scale(1.3) rotate(-10deg); }
    100% { opacity: 0; transform: translateY(-260px) scale(0.8) rotate(15deg); }
}

/* ─── Volume Control ─── */
.pw-volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
}

.pw-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.pw-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pw-primary-light);
    cursor: pointer;
    box-shadow: 0 0 8px var(--pw-primary-glow);
    transition: var(--pw-transition);
}

.pw-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: var(--pw-primary);
}

.pw-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pw-primary-light);
    border: none;
    cursor: pointer;
}

.pw-volume-icon {
    font-size: 1.1rem;
    color: var(--pw-text-muted);
    cursor: pointer;
    transition: color 0.2s;
    min-width: 20px;
    text-align: center;
}

.pw-volume-icon:hover { color: var(--pw-primary-light); }

.pw-volume-value {
    font-size: 0.75rem;
    color: var(--pw-text-dim);
    min-width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ─── Stream Quality Stats ─── */
.pw-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.pw-stat-item {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--pw-radius-sm);
    border: 1px solid var(--pw-border);
}

.pw-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pw-text-dim);
    margin-bottom: 2px;
}

.pw-stat-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pw-text);
    font-variant-numeric: tabular-nums;
}

.pw-stat-value.pw-stat-good { color: var(--pw-success); }
.pw-stat-value.pw-stat-warn { color: var(--pw-warning); }
.pw-stat-value.pw-stat-bad { color: var(--pw-danger); }

/* ─── QR Code Modal ─── */
.pw-qr-modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.pw-qr-modal {
    background: var(--pw-bg-dark);
    border: 1px solid var(--pw-glass-border);
    border-radius: var(--pw-radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 340px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.3s ease;
}

.pw-qr-modal h5 { font-family: var(--pw-font-display); margin-bottom: 1rem; }

.pw-qr-canvas {
    background: white;
    border-radius: var(--pw-radius-sm);
    padding: 1rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.pw-qr-modal .pw-code {
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    display: block;
}

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

/* ─── Viewer Join Notification ─── */
.pw-join-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    background: var(--pw-glass-bg);
    backdrop-filter: blur(var(--pw-glass-blur));
    border: 1px solid var(--pw-glass-border);
    border-radius: 50px;
    color: var(--pw-text);
    font-size: 0.85rem;
    animation: joinSlideUp 0.4s ease, joinFadeOut 0.4s ease 2.6s forwards;
    pointer-events: none;
}

.pw-join-toast i { color: var(--pw-success); }

@keyframes joinSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes joinFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
