/* Koora Live - embeddable player styles (mobile-first) */
:root {
    --bg: #05070d;
    --tab-bg: #0e1420;
    --tab-active: #1b8f5a;
    --text: #e8eef7;
    --muted: #9fb0c3;
    --accent: #22c55e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, system-ui, -apple-system, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body.embed {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Server tabs */
.embed-tabs {
    display: flex;
    gap: 6px;
    padding: 8px;
    margin: 0;
    overflow-x: auto;
    background: var(--tab-bg);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    flex: 0 0 auto;
}

.embed-tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    background: #182234;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.embed-tab:hover { color: var(--text); }
.embed-tab.is-active { background: var(--tab-active); color: #fff; }

/* Stage */
.embed-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
}

#player,
#frame-wrap,
#frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

#player [data-player] { width: 100% !important; height: 100% !important; }

/* Error / loading overlay */
.embed-error {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 7, 13, .82);
    backdrop-filter: blur(2px);
    z-index: 5;
    padding: 16px;
    text-align: center;
}

.embed-error.is-visible { display: flex; }

.embed-error__box {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.embed-error__spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, .18);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.embed-error__message { font-size: 15px; font-weight: 600; }
.embed-error__detail { font-size: 13px; color: var(--muted); }
.embed-error__countdown { font-size: 12px; color: var(--muted); }

.embed-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #05231a;
    font-weight: 700;
    font-size: 14px;
    padding: 9px 18px;
    cursor: pointer;
}

.embed-btn--ghost {
    background: rgba(255, 255, 255, .1);
    color: var(--text);
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 18px;
    line-height: 1;
}

.embed-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;
    opacity: 0;
    transition: opacity .2s;
}

.embed-stage:hover .embed-toolbar { opacity: 1; }

/* Floating ad */
.floating-ad {
    position: fixed;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 20;
    background: rgba(10, 14, 22, .92);
    border-radius: 10px;
    padding: 22px 8px 8px;
    max-width: 96vw;
}

.floating-ad__close {
    position: absolute;
    top: 2px;
    inset-inline-end: 4px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.embed--message .embed-error { display: flex; }
