/* 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://porngifmag.com/content/2018/12/kendra-roll-watch4beauty-dildo-in-shower_005.gif'); 
    
    /* 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 SIDEBAR
========================================== */

.chat-section {
    width: 360px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    background: #0f141c;
    overflow: hidden;
}

/* Header */

.chat-header {
    flex-shrink: 0;
    padding: 16px;
    border-bottom: 1px solid #1e293b;
    background: #111827;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.viewer-count {
    font-size: 13px;
    color: #94a3b8;
}

/* Messages Container */

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

    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

/* Chrome scrollbar */

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 20px;
}

/* Individual Message */

.message {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #cbd5e1;
    word-break: break-word;
    animation: messageAppear .25s ease;
}

/* Username */

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

/* Username Colors */

.user-1 {
    color: #38bdf8;
}

.user-2 {
    color: #f472b6;
}

.user-3 {
    color: #34d399;
}

.user-4 {
    color: #fbbf24;
}

.user-5 {
    color: #a78bfa;
}

/* Keep username + message on same line */

.message p {
    display: inline;
    margin: 0;
    color: #e2e8f0;
}

/* New Message Animation */

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Area */

.chat-input-area {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid #1e293b;
    background: #0c0f16;
}

.chat-input-area input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
}

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

.chat-input-area input:disabled {
    opacity: 0.8;
}

.btn-send {
    background: #334155;
    color: #94a3b8;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: not-allowed;
}