/* ============================================
   Streaming Section - Landing Page
   Style: Dark theme matching nodejs landing
   ============================================ */

.streaming-section {
    padding: 2rem 0;
    padding-top: calc(77px + 2rem);
    background: #141514;
}

.streaming-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.streaming-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 520px;
}

@media (min-width: 1024px) {
    .streaming-layout {
        flex-direction: row;
    }
    .streaming-left {
        width: 60%;
        flex-shrink: 0;
    }
    .streaming-right {
        width: calc(40% - 1.5rem);
        flex-shrink: 0;
    }
}

/* Left panel */
.streaming-left {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.streaming-panel {
    border-radius: 1rem;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 420px;
}

.streaming-panel-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a1628 0%, #0d2847 40%, #122a4e 70%, #0a1628 100%);
    z-index: 0;
}

.streaming-panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
    padding: 2rem;
}

.streaming-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.streaming-desc {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.streaming-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    .streaming-title { font-size: 2rem; }
    .streaming-panel-content { padding: 3rem; }
}

/* Countdown */
.countdown-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(6,235,247,0.25);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    min-width: 52px;
    backdrop-filter: blur(4px);
}

.cd-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #06ebf7;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(6,235,247,0.35);
    transition: transform 0.3s ease;
}

.cd-num.flip {
    transform: scale(1.08);
}

.cd-label {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
}

.cd-sep {
    font-size: 1.2rem;
    font-weight: 700;
    color: #06ebf7;
    align-self: center;
    line-height: 1;
    opacity: 0.5;
}

@media (min-width: 768px) {
    .countdown-row { gap: 0.75rem; }
    .cd-num { font-size: 1.75rem; }
    .cd-block { min-width: 62px; padding: 0.5rem 0.85rem; }
    .cd-sep { font-size: 1.5rem; }
}

/* Video container */
.streaming-video {
    background: #000;
    aspect-ratio: 16 / 9;
    min-height: 0;
}

.streaming-video iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border: 0;
}

/* Cover with image */
.streaming-cover {
    position: relative;
}

.streaming-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streaming-cover .cover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}

/* Viewer Gate */
.viewer-gate {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    border-radius: 1rem;
}

.viewer-gate-card {
    width: 100%;
    max-width: 400px;
    background: #1e293b;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.viewer-gate-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.viewer-gate-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.viewer-gate-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
}

.viewer-gate-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

.viewer-gate-input:focus {
    border-color: #06ebf7;
    box-shadow: 0 0 0 2px rgba(6,235,247,0.15);
}

.viewer-gate-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.viewer-gate-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #06ebf7;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.viewer-gate-btn:hover {
    background: #22d3ee;
}

/* Right panel */
.streaming-right {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Chat Panel */
.chat-panel {
    border-radius: 1rem;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #1e293b;
    background: #0f172a;
    min-height: 380px;
    max-height: 600px;
}

.chat-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e293b;
    flex-shrink: 0;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-header-title {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.chat-participant-count {
    font-size: 0.75rem;
    color: #64748b;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

.chat-welcome {
    text-align: center;
    color: #475569;
    font-size: 0.875rem;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.chat-welcome i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.chat-msg {
    display: flex;
    gap: 0.5rem;
    animation: chatFadeIn 0.25s ease;
}

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

.chat-msg-avatar {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
    background: #334155;
    color: #94a3b8;
}

.chat-msg-admin .chat-msg-avatar {
    background: #06ebf7;
    color: #0f172a;
}

.chat-msg-body {
    flex: 1;
    min-width: 0;
}

.chat-msg-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-msg-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.chat-msg-admin .chat-msg-name {
    color: #06ebf7;
}

.chat-msg-badge {
    background: #06ebf7;
    color: #0f172a;
    font-size: 0.55rem;
    padding: 1px 5px;
    border-radius: 9999px;
    font-weight: 700;
}

.chat-msg-time {
    font-size: 0.65rem;
    color: #475569;
    margin-left: auto;
}

.chat-msg-text {
    font-size: 0.8rem;
    color: #cbd5e1;
    word-break: break-word;
    margin-top: 2px;
    line-height: 1.4;
}

/* Chat Input */
.chat-input-area {
    padding: 0.75rem;
    border-top: 1px solid #1e293b;
    background: #1e293b;
    flex-shrink: 0;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-emoji-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s;
}

.chat-emoji-btn:hover {
    background: #334155;
    color: #06ebf7;
}

.chat-input {
    flex: 1;
    min-width: 0;
    border-radius: 9999px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #06ebf7;
    box-shadow: 0 0 0 2px rgba(6,235,247,0.1);
}

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

.chat-send-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #06ebf7;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: #22d3ee;
}

.chat-send-btn svg {
    width: 16px;
    height: 16px;
}

/* Emoji picker */
.emoji-picker-wrap {
    margin-top: 0.5rem;
}

.emoji-picker {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    max-height: 250px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.emoji-tabs {
    display: flex;
    border-bottom: 1px solid #334155;
    overflow-x: auto;
    padding: 0.25rem;
    flex-shrink: 0;
}

.emoji-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.5rem;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
}

.emoji-tab.active {
    background: rgba(6,235,247,0.15);
    color: #06ebf7;
}

.emoji-grid-wrap {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.1s;
}

.emoji-btn:hover {
    background: #334155;
}

.emoji-grid.hidden {
    display: none;
}

/* Chat Join */
.chat-join {
    padding: 1rem;
    border-top: 1px solid #1e293b;
    background: #1e293b;
    flex-shrink: 0;
}

.chat-join-hint {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    margin-bottom: 0.75rem;
}

.chat-join-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-join-input:focus {
    border-color: #06ebf7;
}

.chat-join-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: #06ebf7;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-join-btn:hover {
    background: #22d3ee;
}

.chat-join-error {
    color: #ef4444;
    font-size: 0.75rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* CTA Panel */
.cta-panel {
    border-radius: 1rem;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 380px;
}

.cta-panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.cta-text {
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #06ebf7;
    color: #0f172a;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #22d3ee;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .streaming-section {
        padding-top: calc(55px + 1rem);
        padding-bottom: 1rem;
    }
    .streaming-container {
        padding: 0 1rem;
    }
    .streaming-panel {
        min-height: 300px;
    }
    .chat-panel {
        min-height: 350px;
        max-height: 450px;
    }
}
