:root {
    --bg-color: #0a0a0c;
    --panel-bg: rgba(20, 20, 25, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --hive-gold: #D4AF37;
    --hive-gold-dim: rgba(212, 175, 55, 0.2);
    --accent-red: #ef4444;
    --glass-blur: blur(16px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
}

.glow-1 {
    top: -10%; left: -10%;
    width: 50vw; height: 50vw;
    background: var(--hive-gold);
    animation: float 20s ease-in-out infinite alternate;
}

.glow-2 {
    bottom: -20%; right: -10%;
    width: 60vw; height: 60vw;
    background: #3b82f6;
    animation: float 25s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, 5%); }
}

/* Views */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
}

/* Layout & Utils */
.hidden { display: none !important; }
.mt-4 { margin-top: 1rem; }

/* Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.brand-logo, .stage-logo {
    height: 70px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Glass Panels */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--hive-gold);
    color: #000;
    padding: 0.8rem 1.5rem;
}

.btn-primary:hover {
    box-shadow: 0 0 15px var(--hive-gold-dim);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

/* Landing Page Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    background: var(--hive-gold-dim);
    color: var(--hive-gold);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 500px;
}

.action-card {
    width: 100%;
    max-width: 450px;
    text-align: left;
}

.action-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--hive-gold);
}

.referral-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.5);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--hive-gold-dim);
    margin-bottom: 1rem;
}

.referral-box code {
    color: var(--hive-gold);
    font-size: 0.9rem;
}

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
}

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

.status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.status-pill.pending {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.status-pill.live {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
    animation: pulse 2s infinite;
}

.status-pill.viewers {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Stage Layout */
#stage-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.stage-header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.5);
}

.stage-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.room-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.stage-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stage-layout {
    flex: 1;
    display: flex;
    padding: 1.5rem;
    gap: 1.5rem;
    overflow: hidden;
}

.main-video-container {
    flex: 1;
    position: relative;
    background: #000;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-feed {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the whole video is visible, preventing sides from being chopped off on phones */
    border-radius: 8px;
    background: #000;
}

.speaker-name {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
}

.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.chat-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.audience-list {
    margin-bottom: 1rem;
    max-height: 150px;
    overflow-y: auto;
}

.audience-member {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audience-member::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hive-gold);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-msg {
    font-size: 0.9rem;
}

.chat-msg .sender {
    font-weight: 600;
    color: var(--hive-gold);
    margin-bottom: 0.2rem;
}

.sys-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0.5rem 0;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    color: white;
}

.chat-input-area button {
    background: var(--text-primary);
    color: black;
    padding: 0 1rem;
}

.bottom-toolbar {
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 0 2rem;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid var(--border-color);
}

.tool-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.tool-btn.active {
    background: var(--hive-gold);
    color: black;
}

.recording-pulse {
    animation: recordPulse 1.5s infinite;
}

@keyframes recordPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    padding: 3rem;
    text-align: center;
}

.btn-close {
    position: absolute;
    top: 1rem; right: 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 2rem;
    border: none;
}

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

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .stage-layout {
        flex-direction: column;
    }
    
    .main-video-container {
        /* Allow video to shrink gracefully above the chat */
        min-height: 40vh;
    }
    
    .sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 40vh;
    }
    
    .bottom-toolbar {
        flex-wrap: wrap;
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .tool-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        flex: 1; /* Make buttons stretch evenly on mobile */
    }
}

.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
}

.pricing-card {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
}

.pricing-card.premium {
    border-color: var(--hive-gold);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(0,0,0,0) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    background: var(--hive-gold);
    color: black;
    padding: 0.2rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.pricing-card ul li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card ul li::before {
    content: '✓';
    color: var(--hive-gold);
}

.pricing-note {
    font-size: 0.8rem;
    color: var(--hive-gold);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 1rem;
}
