/* ═══════════════════════════════════════════════════════════
   InsideGaming Twitch Live
   Accent: #9147ff (Twitch Purple) | BG: #0e0e10
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.igtl-wrap {
    --p:   #9147ff;
    --p2:  #772ce8;
    --bg:  #0e0e10;
    --s1:  #18181b;
    --s2:  #1f1f23;
    --s3:  #26262c;
    --bd:  #3a3a3d;
    --t1:  #efeff1;
    --t2:  #adadb8;
    --t3:  #737379;
    --live:#eb0400;
    --r:   6px;
    --f:   'Inter',-apple-system,sans-serif;

    font-family: var(--f);
    background: var(--bg);
    color: var(--t1);
    -webkit-font-smoothing: antialiased;
}
.igtl-wrap *, .igtl-wrap *::before, .igtl-wrap *::after { box-sizing: border-box; }
.igtl-wrap a { text-decoration: none; }
.igtl-wrap button { font-family: var(--f); }

/* ── Skeleton ─────────────────────────────────────────────── */
.igtl-skel {
    background: linear-gradient(90deg, var(--s2) 25%, var(--s3) 50%, var(--s2) 75%);
    background-size: 200% 100%;
    animation: igtl-shimmer 1.4s infinite;
    border-radius: 4px; display: block;
}
@keyframes igtl-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.igtl-skel--text { width: 140px; height: 12px; margin-top: 2px; }

/* ── Live dot ─────────────────────────────────────────────── */
.igtl-live-dot {
    display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; background: var(--live);
    box-shadow: 0 0 6px var(--live); flex-shrink: 0;
    animation: igtl-pulse 1.4s ease-in-out infinite;
}
@keyframes igtl-pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Status bar ───────────────────────────────────────────── */
.igtl-status-bar {
    background: var(--s1);
    border-bottom: 1px solid var(--bd);
}
.igtl-status-bar__inner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
    padding: 14px 20px; max-width: 1600px; margin: 0 auto;
}

/* Avatar */
.igtl-avatar-wrap { flex-shrink: 0; }
.igtl-avatar-wrap img,
.igtl-avatar-ph {
    width: 44px; height: 44px; border-radius: 50%;
    display: block;
}
.igtl-avatar-wrap img { object-fit: cover; border: 2px solid var(--p); }
.igtl-avatar-ph {
    background: var(--s3); display: flex;
    align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; color: var(--p);
    border: 2px solid var(--p);
}

/* Identity */
.igtl-identity { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.igtl-identity-info { min-width: 0; }
.igtl-channel-name {
    font-size: 16px; font-weight: 700; color: var(--t1);
    display: flex; align-items: center; gap: 5px;
}
.igtl-channel-name svg { width: 14px; height: 14px; fill: var(--p); flex-shrink: 0; }
.igtl-channel-sub {
    font-size: 12px; color: var(--t3); margin-top: 2px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.igtl-follower-count { display: flex; align-items: center; gap: 4px; }
.igtl-follower-count svg { width: 11px; height: 11px; fill: currentColor; }

/* Status pills */
.igtl-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.igtl-live-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--live); color: #fff;
    font-size: 12px; font-weight: 800; letter-spacing: .6px;
    padding: 4px 10px; border-radius: 4px;
}
.igtl-offline-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--s3); color: var(--t3);
    font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 4px;
    border: 1px solid var(--bd);
}
.igtl-offline-pill svg { width: 13px; height: 13px; fill: currentColor; }
.igtl-viewer-count {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 14px; font-weight: 600; color: var(--t1);
}
.igtl-viewer-count svg { width: 14px; height: 14px; fill: var(--p); }

/* Header right */
.igtl-header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.igtl-twitch-link {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--p); color: #fff;
    font-size: 13px; font-weight: 700; font-family: var(--f);
    padding: 9px 16px; border-radius: var(--r);
    transition: background .15s; white-space: nowrap;
}
.igtl-twitch-link svg { width: 14px; height: 14px; fill: #fff; }
.igtl-twitch-link:hover { background: var(--p2); color: #fff; }

.igtl-mediathek-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--s3); color: var(--t2);
    font-size: 13px; font-weight: 600; font-family: var(--f);
    padding: 9px 16px; border-radius: var(--r);
    border: 1.5px solid var(--bd); white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.igtl-mediathek-btn svg { width: 14px; height: 14px; fill: currentColor; }
.igtl-mediathek-btn:hover { border-color: var(--p); color: var(--t1); }

.igtl-team-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--s3); color: var(--t2);
    font-size: 13px; font-weight: 600; font-family: var(--f);
    padding: 9px 16px; border-radius: var(--r);
    border: 1.5px solid var(--p); color: var(--p);
    white-space: nowrap; transition: background .15s, color .15s;
}
.igtl-team-btn svg { width: 14px; height: 14px; fill: currentColor; }
.igtl-team-btn:hover { background: var(--p); color: #fff; }

.igtl-offline-desc {
    font-size: 13px; color: var(--t3);
    max-width: 360px; text-align: center; margin: 0; line-height: 1.5;
}

/* Title bar */
.igtl-title-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 20px; max-width: 1600px; margin: 0 auto;
    width: 100%; border-top: 1px solid var(--bd);
    font-size: 13px; color: var(--t2); background: var(--s2);
    box-sizing: border-box;
}
.igtl-title-bar svg { width: 13px; height: 13px; fill: var(--p); flex-shrink: 0; }

/* ── Category bar ─────────────────────────────────────────── */
.igtl-category-bar {
    background: var(--s2);
    border-bottom: 1px solid var(--bd);
    padding: 12px 20px;
}
.igtl-category-bar__inner {
    display: flex; align-items: center; gap: 14px;
    max-width: 1600px; margin: 0 auto;
}
.igtl-category-cover {
    width: 48px; height: 64px;
    border-radius: 4px; object-fit: cover; display: block;
    flex-shrink: 0; border: 1px solid var(--bd);
}
.igtl-category-cover-ph {
    width: 48px; height: 64px; border-radius: 4px;
    background: var(--s3); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.igtl-category-cover-ph svg { width: 22px; height: 22px; fill: var(--bd); }
.igtl-category-info { min-width: 0; }
.igtl-category-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .6px; color: var(--t3); margin-bottom: 3px;
}
.igtl-category-name {
    font-size: 15px; font-weight: 700; color: var(--t1);
}
.igtl-category-tags {
    display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px;
}
.igtl-tag {
    background: var(--s3); border: 1px solid var(--bd);
    color: var(--t2); font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
}

/* ── Stage ────────────────────────────────────────────────── */
.igtl-stage {
    display: grid;
    grid-template-columns: 1fr 340px;
    background: #000;
    border-bottom: 1px solid var(--bd);
    min-height: 480px;
}

/* Player */
.igtl-player-col { display: flex; flex-direction: column; }
.igtl-player-wrap { flex: 1; position: relative; background: #000; }

.igtl-embed-wrap { position: relative; padding-top: 56.25%; }
.igtl-embed-wrap iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%; border: none; display: block;
}

/* Offline screen */
.igtl-offline-screen {
    position: relative;
    width: 100%; min-height: 480px;
    background: #0a0a0a;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.igtl-offline-screen-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    filter: blur(20px) brightness(.2);
    transform: scale(1.1);
}
.igtl-offline-inner {
    position: relative; z-index: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    text-align: center; padding: 40px 24px;
    max-width: 400px;
}
.igtl-offline-inner svg { width: 52px; height: 52px; fill: var(--p); opacity: .5; }
.igtl-offline-inner h3 { font-size: 22px; font-weight: 700; color: #fff; margin: 0; }
.igtl-offline-inner p  { font-size: 14px; color: var(--t2); margin: 0; }
.igtl-follow-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--p); color: #fff;
    font-size: 14px; font-weight: 700; font-family: var(--f);
    padding: 11px 24px; border-radius: var(--r); margin-top: 6px;
    transition: background .15s;
}
.igtl-follow-btn svg { width: 14px; height: 14px; fill: #fff; }
.igtl-follow-btn:hover { background: var(--p2); color: #fff; }

/* Chat */
.igtl-chat-col {
    border-left: 1px solid var(--bd);
    background: var(--s1);
    display: flex; flex-direction: column;
}
.igtl-chat-header {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px; flex-shrink: 0;
    border-bottom: 1px solid var(--bd);
    background: var(--s2);
    font-size: 13px; font-weight: 700; color: var(--t1);
}
.igtl-chat-header svg { width: 15px; height: 15px; fill: var(--p); }
.igtl-chat-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--live); box-shadow: 0 0 6px var(--live);
    animation: igtl-pulse 1.4s ease-in-out infinite;
}
.igtl-chat-toggle {
    display: none; background: none; border: none;
    color: var(--t3); cursor: pointer; margin-left: auto; padding: 2px;
}
.igtl-chat-toggle svg { width: 16px; height: 16px; fill: currentColor; display: block; }
.igtl-chat-body { flex: 1; overflow: hidden; }
.igtl-chat-iframe { width: 100%; height: 100%; min-height: 480px; display: block; border: none; }

/* ── Mediathek CTA ────────────────────────────────────────── */
.igtl-mediathek-cta {
    background: var(--s1);
    border-top: 1px solid var(--bd);
}
.igtl-mediathek-cta__inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px;
    padding: 18px 20px; max-width: 1600px; margin: 0 auto;
}
.igtl-mediathek-cta__text {
    display: flex; align-items: center; gap: 12px;
    color: var(--t2);
}
.igtl-mediathek-cta__text svg { width: 24px; height: 24px; fill: var(--p); flex-shrink: 0; }
.igtl-mediathek-cta__text strong { display: block; font-size: 15px; color: var(--t1); }
.igtl-mediathek-cta__text span   { font-size: 13px; color: var(--t3); }
.igtl-mediathek-big-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--p); color: #fff;
    font-size: 14px; font-weight: 700; font-family: var(--f);
    padding: 12px 24px; border-radius: var(--r);
    white-space: nowrap; transition: background .15s, transform .1s;
}
.igtl-mediathek-big-btn svg { width: 16px; height: 16px; fill: #fff; }
.igtl-mediathek-big-btn:hover { background: var(--p2); color: #fff; transform: translateY(-1px); }

/* ── Responsive ───────────────────────────────────────────── */
@media(max-width:960px) {
    .igtl-stage { grid-template-columns: 1fr; min-height: auto; }
    .igtl-chat-col { border-left: none; border-top: 1px solid var(--bd); max-height: 420px; }
    .igtl-chat-toggle { display: block; }
    .igtl-chat-col.is-collapsed .igtl-chat-body { display: none; }
    .igtl-embed-wrap iframe { min-height: 56vw; }
}
@media(max-width:640px) {
    .igtl-status-bar__inner { padding: 12px; gap: 10px; }
    .igtl-header-right { margin-left: 0; width: 100%; }
    .igtl-twitch-link, .igtl-mediathek-btn { flex: 1; justify-content: center; }
    .igtl-mediathek-cta__inner { flex-direction: column; }
    .igtl-mediathek-big-btn { width: 100%; justify-content: center; }
    .igtl-category-bar { padding: 10px 12px; }
}
