/* =========================================================================
   SEKTOR 9 – Modul `twitch-streamer` (Cyber-HUD Stylesheet)
   Obsidian #090812 · Panel #121024 · Neon-Purple #9333ea/#a855f7 · Cyan #22d3ee
   ========================================================================= */

@keyframes s9TwitchPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.75);
    }
    50% {
        opacity: 0.72;
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0);
    }
}

@keyframes s9TwitchGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
    }
    50% {
        box-shadow: 0 0 18px rgba(239, 68, 68, 0.8);
    }
}

/* Header-Icon auf /twitch/settings */
.s9-tw-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #f3e8ff;
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
    border: 1px solid rgba(192, 132, 252, 0.55);
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.45);
    flex-shrink: 0;
}

/* Status-Pillen */
.s9-tw-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.s9-tw-status-pending {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fcd34d;
}

.s9-tw-status-none {
    background: rgba(30, 27, 56, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #94a3b8;
}

.s9-tw-status-blocked {
    background: rgba(225, 29, 72, 0.18);
    border: 1px solid rgba(244, 63, 94, 0.55);
    color: #fda4af;
}

/* Violettes Neon-Badge: Verifizierter Streamer */
.s9-tw-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #faf5ff;
    background: linear-gradient(135deg, #6b21a8 0%, #9333ea 55%, #a855f7 100%);
    border: 1px solid rgba(216, 180, 254, 0.65);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.45);
    white-space: nowrap;
}

.s9-tw-verified-mini {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #f3e8ff;
    background: rgba(147, 51, 234, 0.35);
    border: 1px solid rgba(192, 132, 252, 0.55);
    white-space: nowrap;
}

/* Pulsierender roter LIVE-Punkt & LIVE-Button */
.s9-tw-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background-color: #ffffff;
    animation: s9TwitchPulse 1.6s infinite ease-in-out;
    flex-shrink: 0;
}

.s9-tw-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 6px;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: 1px solid rgba(254, 202, 202, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

.s9-tw-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #ffffff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 55%, #ef4444 100%);
    border: 1px solid rgba(254, 202, 202, 0.55);
    animation: s9TwitchGlow 2.2s infinite ease-in-out;
    transition: transform 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
}

.s9-tw-live-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.s9-tw-live-btn-sm {
    padding: 4px 10px;
    font-size: 10px;
}

/* Dashboard-Widget-Karten („LIVE AUF TWITCH“) */
.s9-tw-widget-card {
    background: linear-gradient(180deg, rgba(15, 13, 30, 0.96) 0%, rgba(11, 9, 22, 0.98) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 4px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.s9-tw-widget-card:hover {
    border-color: rgba(192, 132, 252, 0.55);
    box-shadow: 0 0 16px rgba(147, 51, 234, 0.2);
}

.s9-tw-widget-card-verified {
    border-color: rgba(168, 85, 247, 0.48);
    box-shadow: inset 0 1px 0 0 rgba(192, 132, 252, 0.14);
}

.s9-tw-stream-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.s9-tw-watch-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #c084fc;
    text-decoration: none;
    transition: color 0.15s ease;
}

.s9-tw-watch-link:hover {
    color: #22d3ee;
    text-decoration: underline;
}

/* =========================================================================
   2-STUFEN-ANZEIGE IN PROFILEN (/character/{id} & /profile)
   ========================================================================= */

/* Stufe 1: Elegante Cyber-HUD-Streamer-Box für verifizierte Streamer */
.s9-tw-profile-box {
    background: linear-gradient(135deg, rgba(30, 16, 56, 0.92) 0%, rgba(14, 12, 30, 0.96) 65%, rgba(12, 26, 38, 0.92) 100%);
    border: 1px solid rgba(168, 85, 247, 0.48);
    border-radius: 5px;
    padding: 12px 14px;
    box-shadow: 0 0 18px rgba(147, 51, 234, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.s9-tw-profile-box-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.s9-tw-profile-box-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.s9-tw-profile-channel-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #d8b4fe;
    text-decoration: none;
    transition: color 0.15s ease;
}

.s9-tw-profile-channel-link:hover {
    color: #22d3ee;
    text-decoration: underline;
}

.s9-tw-profile-live-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(168, 85, 247, 0.22);
}

.s9-tw-profile-live-meta {
    min-width: 0;
    flex: 1 1 220px;
}

.s9-tw-profile-live-title {
    font-size: 12px;
    color: #f1f5f9;
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.s9-tw-profile-live-viewers {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #fda4af;
    margin-top: 2px;
}

.s9-tw-profile-manage-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #67e8f9;
    text-decoration: none;
    opacity: 0.9;
}

.s9-tw-profile-manage-link:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Stufe 2: Dezenter LIVE-Link für nicht verifizierte Streamer (ohne Verifizierungs-Badge) */
.s9-tw-unverified-strip {
    background: rgba(15, 13, 30, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.s9-tw-unverified-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #fca5a5;
    text-decoration: none;
    transition: color 0.15s ease;
}

.s9-tw-unverified-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================================================================
   KOMPAKTE MINI-BADGES IN RUHMESHALLE (/leaderboard) & ARENA (/arena)
   ========================================================================= */

.s9-tw-mini-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

.s9-tw-mini-streamer,
.s9-tw-mini-live {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 5px;
    height: 16px;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    vertical-align: middle;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.s9-tw-mini-streamer {
    color: #f3e8ff !important;
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.9) 0%, rgba(147, 51, 234, 0.92) 100%);
    border: 1px solid rgba(216, 180, 254, 0.55);
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.s9-tw-mini-live {
    color: #ffffff !important;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: 1px solid rgba(254, 202, 202, 0.55);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.s9-tw-mini-streamer:hover,
.s9-tw-mini-live:hover {
    filter: brightness(1.14);
    transform: translateY(-0.5px);
}

.s9-tw-mini-dot {
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: #ffffff;
    display: inline-block;
    animation: s9TwitchPulse 1.5s infinite ease-in-out;
}
