/* streaming/streaming.css — Stream Mode Additions + Light Theme */

/* ============================================================
   STREAM CONTROLS BLOCK (above tabs in control panel)
   ============================================================ */

.stream-controls-block {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Stream Mode Banner --- */
.stream-mode-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.12), rgba(255, 71, 87, 0.04));
    border: 1px solid rgba(255, 71, 87, 0.25);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ff4757;
}

.stream-live-dot {
    width: 8px;
    height: 8px;
    background: #ff4757;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 71, 87, 0.6);
    animation: streamDotPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

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

/* --- Stream Sections --- */
.stream-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
}

.stream-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 8px;
}

.stream-section-desc {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.5;
    margin-bottom: 10px;
}

.stream-section-desc strong {
    color: #bbb;
}

/* --- URL Row --- */
.stream-url-row {
    display: flex;
    gap: 8px;
}

.stream-url-input {
    flex: 1;
    background: #0e0e12;
    border: 1px solid #333;
    color: var(--primary);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    outline: none;
    min-width: 0;
}

.stream-url-input:focus {
    border-color: var(--primary);
}

.stream-copy-btn {
    background: var(--primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.stream-copy-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

/* --- Push Button --- */
.stream-push-btn {
    width: 100%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.stream-push-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.3);
}

.stream-push-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stream-push-btn svg {
    flex-shrink: 0;
}

/* --- Feedback Messages --- */
.stream-feedback {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 8px;
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stream-feedback.visible {
    opacity: 1;
}

.stream-feedback.success { color: #2ecc71; }
.stream-feedback.error { color: #ff4757; }

/* --- Guide Section --- */
.stream-guide-section {
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stream-guide-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    color: #aaa;
    transition: color 0.2s;
    user-select: none;
}

.stream-guide-header:hover {
    color: #fff;
}

.stream-guide-header svg:first-child {
    color: var(--primary);
    flex-shrink: 0;
}

.stream-guide-header span {
    flex: 1;
}

.stream-guide-chevron {
    color: #555;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.stream-guide-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stream-guide-body.open {
    max-height: 800px;
}

.stream-guide-chevron.open {
    transform: rotate(180deg);
}

/* --- Steps --- */
.stream-steps {
    padding: 0 14px 14px;
    margin: 0;
    list-style: none;
    counter-reset: stream-step;
}

.stream-steps li {
    counter-increment: stream-step;
    position: relative;
    padding: 8px 0 8px 36px;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.stream-steps li:last-child {
    border-bottom: none;
}

.stream-steps li::before {
    content: counter(stream-step);
    position: absolute;
    left: 0;
    top: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 900;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-steps li strong {
    color: #ddd;
}

.stream-steps li code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.75rem;
}

/* --- Platform Tags --- */
.stream-platforms {
    padding: 0 14px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.stream-platform-tag {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #888;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
}

/* --- Pro Tips --- */
.stream-pro-tips {
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
}

.stream-pro-tips strong {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    display: block;
    margin-bottom: 8px;
}

.stream-pro-tips ul {
    margin: 0;
    padding-left: 16px;
}

.stream-pro-tips li {
    font-size: 0.75rem;
    color: #777;
    line-height: 1.5;
    margin-bottom: 4px;
}

.stream-pro-tips li strong { color: #bbb; }

.stream-pro-tips li code {
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--primary);
    font-size: 0.72rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 800px) {
    .stream-url-row {
        flex-direction: column;
    }

    .stream-copy-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stream-section {
        padding: 12px;
    }

    .stream-section-desc {
        font-size: 0.72rem;
    }

    .stream-push-btn {
        font-size: 0.82rem;
        padding: 11px;
    }
}

@media print {
    .stream-controls-block {
        display: none !important;
    }
}

/* ============================================================
   LIGHT THEME — Stream Mode Overrides
   ============================================================ */

/* --- Banner --- */
body.light-theme .stream-mode-banner {
    background: linear-gradient(135deg, rgba(239, 90, 111, 0.1), rgba(239, 90, 111, 0.03));
    border-color: rgba(239, 90, 111, 0.25);
    color: var(--accent);
}

body.light-theme .stream-live-dot {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(239, 90, 111, 0.5);
}

/* --- Sections --- */
body.light-theme .stream-section {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
}

body.light-theme .stream-section-label {
    color: var(--primary);
}

body.light-theme .stream-section-desc {
    color: #5a6a7a;
}

body.light-theme .stream-section-desc strong {
    color: #2a3a4a;
}

/* --- URL Input --- */
body.light-theme .stream-url-input {
    background: #fff;
    border: 2px solid var(--border);
    color: var(--primary);
}

body.light-theme .stream-url-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 123, 247, 0.15);
}

/* --- Copy Button --- */
body.light-theme .stream-copy-btn {
    background: var(--primary);
    color: #fff;
}

/* --- Push Button --- */
body.light-theme .stream-push-btn {
    background: linear-gradient(135deg, #5cb88a, #4da87a);
    color: #fff;
}

body.light-theme .stream-push-btn:hover {
    box-shadow: 0 4px 16px rgba(92, 184, 138, 0.3);
}

/* --- Feedback --- */
body.light-theme .stream-feedback.success {
    color: #3a9a60;
}

body.light-theme .stream-feedback.error {
    color: var(--accent);
}

/* --- Guide Section --- */
body.light-theme .stream-guide-section {
    border-color: var(--border);
}

body.light-theme .stream-guide-header {
    color: #5a6a7a;
}

body.light-theme .stream-guide-header:hover {
    color: #1a1a2e;
}

body.light-theme .stream-guide-header svg:first-child {
    color: var(--primary);
}

body.light-theme .stream-guide-chevron {
    color: #9aa8b8;
}

body.light-theme .stream-guide-chevron.open {
    color: var(--primary);
}

/* --- Steps --- */
body.light-theme .stream-steps li {
    color: #4a5a6a;
    border-bottom-color: var(--border);
}

body.light-theme .stream-steps li::before {
    background: var(--primary);
    color: #fff;
}

body.light-theme .stream-steps li strong {
    color: #1a1a2e;
}

body.light-theme .stream-steps li code {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}

/* --- Platform Tags --- */
body.light-theme .stream-platform-tag {
    background: #edf0f5;
    border: 1px solid var(--border);
    color: #5a6a7a;
}

/* --- Pro Tips --- */
body.light-theme .stream-pro-tips {
    border-top-color: var(--border);
}

body.light-theme .stream-pro-tips strong {
    color: #7a8a9a;
}

body.light-theme .stream-pro-tips li {
    color: #4a5a6a;
}

body.light-theme .stream-pro-tips li strong {
    color: #2a3a4a;
}

body.light-theme .stream-pro-tips li code {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
}