/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0b111e;
    color: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Layout Container */
.app-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 600px;
    background-color: #121824;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Video Section (Left) */
.video-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #1a202c;
    border-right: 1px solid #2d3748;
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(to bottom, #121824, transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.stream-title {
    font-weight: 600;
    font-size: 1rem;
    color: #e2e8f0;
}

.badge-live {
    background-color: #e53e3e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.video-placeholder {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Simulated background asset using a real image */
.blurred-stream-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* 1. Add your image source path here */
    background-image: url('https://ic-vt-nss.xhcdn.com/a/ZDM3ZmVkMDEzMjBhZTkwNTdmMzczMzk5MWM4YTRhMjI/s(w:1280,h:720),webp/018/176/903/1280x720.1.jpg'); 
    
    /* 2. Ensure the image covers the entire container proportionally */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* 3. Apply a blur and a dark overlay so the text modal stays readable */
    filter: blur(6px);
    transform: scale(1.05); /* Prevents white edges caused by the blur effect */
    opacity: 0.4; /* Softens the image brightness against the dark theme */
    
    z-index: 1;
}
/* Subscription/Paywall Modal */
.paywall-modal {
    position: relative;
    z-index: 5;
    width: 85%;
    max-width: 460px;
    padding: 32px;
    background: linear-gradient(135deg, #1e2638 0%, #111622 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.modal-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #93c5fd;
    background-color: rgba(147, 197, 253, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.paywall-modal h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ffffff;
}

.paywall-modal p {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-primary {
    background: linear-gradient(to right, #ffb703, #fb8500);
    color: #023047;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 14px rgba(251, 133, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

/* Video Controls Layout */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    display: flex;
    gap: 12px;
    background: linear-gradient(to top, #121824, transparent);
    z-index: 10;
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

/* Chat Section (Right Sidebar) */
.chat-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background-color: #0f141c;
}

.chat-header {
    padding: 16px;
    border-bottom: 1px solid #1e293b;
}

.chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.viewer-count {
    font-size: 0.8rem;
    color: #64748b;
}

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

.message {
    font-size: 0.9rem;
    line-height: 1.4;
}

.username {
    font-weight: 600;
    margin-right: 6px;
}

/* Distinct simulated user colors */
.user-1 { color: #38bdf8; }
.user-2 { color: #f43f5e; }
.user-3 { color: #34d399; }
.user-4 { color: #fbbf24; }
.user-5 { color: #a78bfa; }

.message p {
    display: inline;
    color: #cbd5e1;
}

/* Disabled/Locked Input Area */
.chat-input-area {
    padding: 16px;
    border-top: 1px solid #1e293b;
    display: flex;
    gap: 8px;
    background-color: #0c0f16;
}

.chat-input-area input {
    flex: 1;
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 8px 12px;
    color: #f8fafc;
    font-size: 0.85rem;
}

.chat-input-area input::placeholder {
    color: #475569;
}

.btn-send {
    background-color: #334155;
    color: #94a3b8;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
