/* ============================================================
   schorsch180 – Premium Design mit Dark Mode
   ============================================================ */

/* --- Light Mode (Default) --- */
:root {
    --blue-900: #0a1e3d;
    --blue-800: #0d3b7a;
    --blue-700: #1252a0;
    --blue-600: #1a6dd4;
    --blue-500: #3b8ef0;
    --blue-400: #6db0f7;
    --blue-300: #a3d0fc;
    --blue-200: #d0e6fd;
    --blue-100: #e8f1fe;
    --blue-50:  #f3f8ff;
    --white:    #ffffff;
    --gray-100: #f0f4f8;
    --gray-200: #dce3ed;
    --gray-400: #8a9ab0;
    --gray-600: #4a5e78;
    --red:      #eb0400;
    --green:    #22c55e;
    --gold:     #f59e0b;
    --shadow-sm:  0 1px 3px rgba(10, 30, 60, 0.06);
    --shadow-md:  0 4px 12px rgba(10, 30, 60, 0.08);
    --shadow-lg:  0 8px 24px rgba(10, 30, 60, 0.12);
    --radius:     12px;
    --radius-lg:  16px;
    --bg-body: linear-gradient(135deg, var(--blue-50) 0%, var(--gray-100) 100%);
    --bg-card: var(--white);
    --bg-nav: var(--white);
    --text-primary: var(--blue-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border-color: var(--gray-200);
    --bg-tag: var(--blue-100);
    --bg-tab: transparent;
    --bg-tab-hover: var(--blue-50);
    --bg-input: var(--white);
    --bg-code: var(--gray-100);
}

/* --- Dark Mode --- */
[data-theme="dark"] {
    --blue-900: #e2ecf7;
    --blue-800: #a3c4e8;
    --blue-700: #6da8e0;
    --blue-600: #3b8ef0;
    --blue-500: #2a7de0;
    --blue-400: #1a5fb0;
    --blue-300: #153d6e;
    --blue-200: #1a2d4a;
    --blue-100: #162236;
    --blue-50:  #0f1923;
    --white:    #1a2332;
    --gray-100: #0d1520;
    --gray-200: #243044;
    --gray-400: #6b7f99;
    --gray-600: #9badc4;
    --red:      #ef4444;
    --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.4);
    --bg-body: linear-gradient(135deg, #0a1018 0%, #0f1923 100%);
    --bg-card: #1a2332;
    --bg-nav: #1a2332;
    --text-primary: #e2ecf7;
    --text-secondary: #9badc4;
    --text-muted: #6b7f99;
    --border-color: #243044;
    --bg-tag: #1e3050;
    --bg-tab: transparent;
    --bg-tab-hover: #1e3050;
    --bg-input: #162236;
    --bg-code: #0f1923;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================================================
   Page Transition (Fade)
   ============================================================ */

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html .app {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html.page-loaded .app {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback: Wenn JS nicht lädt, Seite trotzdem anzeigen */
html:not(.page-loaded):not(.page-leaving) .app {
    animation: fallbackFadeIn 0.5s 1s ease forwards;
}

@keyframes fallbackFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

html.page-leaving .app {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* ============================================================
   Dark Mode Toggle
   ============================================================ */

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--bg-tab-hover);
    transform: scale(1.05);
}

/* ============================================================
   Globale Navigation – Modern & Interaktiv
   ============================================================ */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-nav);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem 0.5rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s;
    position: relative;
}

.site-nav-brand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue-600);
    text-decoration: none;
    letter-spacing: -0.3px;
    transition: color 0.2s, transform 0.2s;
}

.site-nav-brand:hover {
    transform: scale(1.03);
}

.site-nav-links {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.site-nav-link {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.site-nav-link:hover {
    background: var(--bg-tab-hover);
    color: var(--blue-600);
    transform: translateY(-1px);
}

.site-nav-link.active {
    background: var(--blue-600);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 109, 212, 0.25);
}

.site-nav-link.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 109, 212, 0.35);
}

[data-theme="dark"] .site-nav-link.active {
    background: var(--blue-500);
    color: #fff;
}

/* ============================================================
   Loading
   ============================================================ */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 1.5rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading p { color: var(--text-muted); font-size: 0.95rem; }

/* ============================================================
   Header / Profil (Twitch + YouTube)
   ============================================================ */

.header {
    background: linear-gradient(135deg, #0d3b7a 0%, #1a6dd4 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.header.has-banner {
    min-height: 200px;
}

.header.has-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,59,122,0.85) 0%, rgba(26,109,212,0.75) 100%);
    z-index: 0;
}

.header.yt-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #c0392b 100%);
}

.header.yt-theme.has-banner::after {
    background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(192,57,43,0.75) 100%);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.header-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    position: relative;
    z-index: 2;
}

.header-info {
    position: relative;
    z-index: 2;
    flex: 1;
}

.header-info h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-info p {
    opacity: 0.85;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    max-width: 500px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.header-badges { margin-bottom: 0.5rem; }

.header-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.header-stat { text-align: center; }
.header-stat .val { font-size: 1.4rem; font-weight: 700; }
.header-stat .lbl { font-size: 0.75rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================================
   Status Badge
   ============================================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.live { background: var(--red); color: #fff; animation: pulse-badge 2s infinite; }
.status-badge.offline { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-badge.live .status-dot { animation: blink 1.5s infinite; }

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(235, 4, 0, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(235, 4, 0, 0); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }
.btn svg { flex-shrink: 0; }

.btn-twitch { background: #9147ff; color: #fff; }
.btn-twitch:hover { box-shadow: 0 4px 12px rgba(145, 71, 255, 0.4); }

.btn-youtube { background: #ff0000; color: #fff; }
.btn-youtube:hover { box-shadow: 0 4px 12px rgba(255, 0, 0, 0.35); }

.btn-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.btn-instagram:hover { box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4); }

/* ============================================================
   Tabs
   ============================================================ */

.nav-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 0.3rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    transition: background 0.3s;
}

.nav-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    background: var(--bg-tab);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.nav-tab:hover { background: var(--bg-tab-hover); color: var(--blue-600); }
.nav-tab.active { background: var(--blue-600); color: #fff; box-shadow: 0 2px 8px rgba(26, 109, 212, 0.3); }

[data-theme="dark"] .nav-tab.active { background: var(--blue-500); }

.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Cards
   ============================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.3s;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-600);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
}

.dashboard-grid .card-full { grid-column: 1 / -1; }

/* ============================================================
   Stat Cards
   ============================================================ */

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 3px solid var(--blue-500);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--blue-600); line-height: 1.2; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.3px; }

.stat-card.yt-accent { border-bottom-color: #ff0000; }
.stat-card.yt-accent .stat-value { color: #ef4444; }

[data-theme="dark"] .stat-card.yt-accent .stat-value { color: #f87171; }

/* ============================================================
   Live Banner + Last Stream
   ============================================================ */

.live-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: #fff;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--red);
}

.live-banner h3 { font-size: 1.1rem; margin-bottom: 0.5rem; word-break: break-word; overflow-wrap: break-word; }
.live-banner .live-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; color: rgba(255,255,255,0.75); font-size: 0.9rem; }

.last-stream-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--blue-500);
    transition: background 0.3s;
}

.last-stream-card h3 { font-size: 1rem; color: var(--blue-600); margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.last-stream-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--text-secondary); font-size: 0.85rem; }

/* ============================================================
   Stream Embed
   ============================================================ */

.stream-embed-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.25rem;
    background: #000;
}

.stream-embed-wrap iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

/* ============================================================
   Uptime Timer
   ============================================================ */

.uptime-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--green);
}

/* ============================================================
   Auto-Refresh Countdown
   ============================================================ */

.refresh-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s;
}

.refresh-bar .refresh-countdown {
    font-weight: 700;
    color: var(--blue-600);
    font-variant-numeric: tabular-nums;
}

.refresh-bar button {
    background: var(--blue-600);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.refresh-bar button:hover { background: var(--blue-500); }

/* ============================================================
   Tags
   ============================================================ */

.tags-wrap { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { background: var(--bg-tag); color: var(--blue-600); padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500; transition: background 0.2s; }
.tag:hover { background: var(--border-color); }

/* ============================================================
   Chat Embed
   ============================================================ */

.chat-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #18181b; }
.chat-wrap iframe { display: block; width: 100%; height: 420px; border: none; }

/* ============================================================
   Clips / Video Grid
   ============================================================ */

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
}

.clip-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s;
    position: relative;
}

.clip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.clip-card a { text-decoration: none; color: inherit; display: block; }

.clip-thumb { position: relative; overflow: hidden; }
.clip-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform 0.3s ease; }
.clip-card:hover .clip-thumb img { transform: scale(1.05); }

.clip-views, .clip-duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.clip-info { padding: 0.9rem; }
.clip-info h4 { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-info .clip-date { font-size: 0.78rem; color: var(--text-muted); }

/* Top Clip Ranking */
.clip-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.clip-rank.rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #78350f; }
.clip-rank.rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #334155; }
.clip-rank.rank-3 { background: linear-gradient(135deg, #d97706, #f59e0b); color: #451a03; }

/* Video stats row */
.video-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.video-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Best video highlight */
.clip-card.best-video {
    border: 2px solid var(--gold);
    position: relative;
}

.best-video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #78350f;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ============================================================
   VOD Cards
   ============================================================ */

.vods-grid { display: flex; flex-direction: column; gap: 1rem; }

.vod-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s;
}

.vod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.vod-card a { display: flex; gap: 1.25rem; text-decoration: none; color: inherit; }

.vod-thumb { position: relative; flex-shrink: 0; overflow: hidden; }
.vod-thumb img { width: 280px; max-width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform 0.3s ease; }
.vod-card:hover .vod-thumb img { transform: scale(1.05); }

.vod-duration { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.75); color: #fff; padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.75rem; font-weight: 600; }

.vod-info { padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.vod-info h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; word-break: break-word; overflow-wrap: break-word; }
.vod-meta { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.7; }

/* ============================================================
   Schedule
   ============================================================ */

.schedule-list { display: flex; flex-direction: column; gap: 0.6rem; }

.schedule-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    border-left: 4px solid var(--blue-500);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
}

.schedule-item:hover { border-left-color: var(--blue-600); box-shadow: var(--shadow-md); }
.schedule-date { font-weight: 700; color: var(--blue-600); min-width: 170px; font-size: 0.9rem; }
.schedule-title { font-weight: 600; color: var(--text-primary); word-break: break-word; overflow-wrap: break-word; }
.schedule-game { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   Goal Card
   ============================================================ */

.goal-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--blue-500);
    transition: background 0.3s;
}

.goal-numbers { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.75rem; }
.goal-current { font-size: 2rem; font-weight: 700; color: var(--blue-600); }
.goal-separator { font-size: 0.9rem; color: var(--text-muted); }
.goal-target { font-size: 1.4rem; font-weight: 600; color: var(--text-primary); }

.goal-bar-wrap { width: 100%; height: 12px; background: var(--bg-tag); border-radius: 6px; overflow: hidden; margin-bottom: 0.4rem; }
.goal-bar { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--blue-600)); border-radius: 6px; transition: width 1s ease; }
.goal-percent { font-size: 0.85rem; font-weight: 600; color: var(--blue-600); text-align: right; }

.goal-login-text { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.75rem; }
.goal-login-btn { display: inline-block; background: linear-gradient(135deg, var(--blue-600), #1252a0); color: #fff; padding: 0.6rem 1.2rem; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: transform 0.2s, box-shadow 0.2s; }
.goal-login-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26, 109, 212, 0.3); }

/* ============================================================
   Milestone Banner
   ============================================================ */

.milestone-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
    color: #78350f;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    animation: milestoneGlow 2s ease-in-out infinite alternate;
}

@keyframes milestoneGlow {
    from { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
    to { box-shadow: 0 4px 24px rgba(245, 158, 11, 0.6); }
}

/* ============================================================
   Countdown to next stream
   ============================================================ */

.countdown-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--green);
    transition: background 0.3s;
}

.countdown-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.countdown-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
    font-variant-numeric: tabular-nums;
}

.countdown-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   Load More Button
   ============================================================ */

.load-more-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 2rem;
    background: var(--bg-card);
    color: var(--blue-600);
    border: 2px solid var(--blue-600);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.load-more-btn:hover {
    background: var(--blue-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   Welcome Page (index.php)
   ============================================================ */

.welcome-hero {
    background: linear-gradient(135deg, #0d3b7a 0%, #1a6dd4 50%, #9147ff 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.welcome-hero-info {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.welcome-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.welcome-hero p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.welcome-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.welcome-btn:hover { transform: translateY(-2px); }

.welcome-btn.twitch { background: #9147ff; color: #fff; }
.welcome-btn.twitch:hover { box-shadow: 0 6px 20px rgba(145, 71, 255, 0.5); }

.welcome-btn.youtube { background: #ff0000; color: #fff; }
.welcome-btn.youtube:hover { box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4); }

.welcome-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.welcome-btn.instagram:hover { box-shadow: 0 6px 20px rgba(225, 48, 108, 0.4); }

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.welcome-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, background 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.welcome-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.welcome-card .wc-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.welcome-card h3 { font-size: 1.2rem; color: var(--blue-600); margin-bottom: 0.5rem; }
.welcome-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }

/* ============================================================
   Shorts Grid (Hochformat)
   ============================================================ */

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(180px, 45%), 1fr));
    gap: 1rem;
}

.short-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s;
}

.short-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.short-card a { text-decoration: none; color: inherit; display: block; }

.short-thumb { position: relative; overflow: hidden; }
.short-thumb img { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; transition: transform 0.3s ease; }
.short-card:hover .short-thumb img { transform: scale(1.05); }

.short-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================================
   Empty State + Error + Toast + Footer
   ============================================================ */

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.95rem; }

.error-box { background: #fef2f2; border: 1px solid #fca5a5; border-radius: var(--radius); padding: 1.5rem; color: #991b1b; text-align: center; }
[data-theme="dark"] .error-box { background: #3b1111; border-color: #7f1d1d; color: #fca5a5; }

.toast {
    position: fixed; top: 1.5rem; right: 1.5rem;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem; border-radius: 10px;
    font-size: 0.9rem; font-weight: 500;
    box-shadow: var(--shadow-lg); z-index: 1000;
    opacity: 0; transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.show { opacity: 1; transform: translateY(0); }

.footer {
    text-align: center; color: var(--text-muted); font-size: 0.78rem;
    margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color);
}
.footer a { color: var(--blue-600); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ============================================================
   CountUp Animation
   ============================================================ */

.countup { display: inline-block; }

/* ============================================================
   Skeleton Loading
   ============================================================ */

.skeleton {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.skeleton-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.skeleton-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--border-color);
    animation: shimmer 1.5s infinite;
}

.skeleton-lines { flex: 1; }

.skeleton-line {
    height: 14px;
    background: var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.6rem;
    animation: shimmer 1.5s infinite;
}

.skeleton-line.w60 { width: 60%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.h24 { height: 24px; }

.skeleton-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skeleton-tab {
    flex: 1;
    height: 44px;
    background: var(--bg-card);
    border-radius: 10px;
    animation: shimmer 1.5s infinite;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.skeleton-stat {
    height: 100px;
    background: var(--bg-card);
    border-radius: var(--radius);
    animation: shimmer 1.5s infinite;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 1.25rem;
}

.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    animation: shimmer 1.5s infinite;
}

.skeleton-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--border-color);
}

.skeleton-card-body { padding: 0.9rem; }

@keyframes shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ============================================================
   Clip Hover Preview (animiertes Thumbnail)
   ============================================================ */

.clip-thumb .clip-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.clip-card:hover .clip-thumb .clip-preview {
    opacity: 1;
}

/* ============================================================
   Share Buttons
   ============================================================ */

.share-row {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 0;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.7;
    text-decoration: none;
    color: #fff;
}

.share-btn:hover { transform: scale(1.15); opacity: 1; }

.share-btn svg { flex-shrink: 0; }

.share-btn.twitter { background: #000; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: var(--gray-600); }
.share-btn.native { background: var(--blue-600); }

/* ============================================================
   Video Description Accordion
   ============================================================ */

.video-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--blue-600);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.2rem;
    min-height: 44px;
    margin-top: 0.3rem;
    font-family: inherit;
    transition: color 0.2s;
}

.video-desc-toggle:hover { color: var(--blue-500); }

.video-desc-toggle .arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.6rem;
}

.video-desc-toggle.open .arrow { transform: rotate(180deg); }

.video-desc-content {
    display: none;
    margin-top: 0.4rem;
    padding: 0.5rem 0.6rem;
    background: var(--bg-tag);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 150px;
    overflow-y: auto;
}

.video-desc-content.open { display: block; }

/* ============================================================
   Live Now Banner (index.php)
   ============================================================ */

.live-now-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--red);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: livePulse 3s ease-in-out infinite;
}

.live-now-banner:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.live-now-banner .live-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--red);
    animation: blink 1.5s infinite;
    flex-shrink: 0;
}

.live-now-banner .live-text {
    font-weight: 700;
    font-size: 1rem;
}

.live-now-banner .live-game {
    opacity: 0.7;
    font-size: 0.85rem;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(235, 4, 0, 0.15); }
    50% { box-shadow: 0 4px 24px rgba(235, 4, 0, 0.35); }
}

/* ============================================================
   Recent Followers
   ============================================================ */

.recent-followers {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.follower-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.follower-avatar:hover { transform: translateY(-2px); }

.follower-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: border-color 0.2s;
}

.follower-avatar:hover img { border-color: var(--blue-600); }

.follower-avatar span {
    font-size: 0.75rem;
    font-weight: 500;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* ============================================================
   Lazy Embed Placeholder
   ============================================================ */

.lazy-embed {
    position: relative;
    cursor: pointer;
}

.lazy-embed-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #18181b;
    border-radius: var(--radius);
    aspect-ratio: 16/9;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    gap: 0.5rem;
    transition: background 0.2s;
}

.lazy-embed-placeholder:hover { background: #2a2a3e; }

.lazy-embed-placeholder .play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ============================================================
   Quota Warning
   ============================================================ */

.quota-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

[data-theme="dark"] .quota-warning {
    background: #422006;
    border-color: #b45309;
    color: #fbbf24;
}

/* ============================================================
   Relative Time Tooltip
   ============================================================ */

.time-relative {
    cursor: help;
    border-bottom: 1px dotted var(--text-muted);
}

/* Legal pages (Impressum, Datenschutz) */
.card-page { max-width: 800px; width: 100%; margin: 0 auto; }
.page-title { font-size: 1.5rem; color: var(--blue-600); margin-bottom: 1.5rem; }
.section-heading { font-size: 1.1rem; color: var(--blue-600); margin: 1.25rem 0 0.5rem; }
.legal-text { line-height: 1.7; color: var(--text-secondary); }
.link-inherit { color: inherit; text-decoration: none; }
.section-title { font-size: 1.2rem; color: var(--blue-600); margin-bottom: 1rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-1-5 { margin-bottom: 1.5rem; }

/* ============================================================
   Visitor Counter – Modern Card Design
   ============================================================ */

.visitor-counter {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.visitor-counter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.visitor-counter-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.visitor-counter-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.visitor-counter-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Stat-Cards Grid */
.visitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
    gap: 0.6rem;
}

.visitor-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem 0.75rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    position: relative;
    overflow: hidden;
}

.visitor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.visitor-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--blue-500);
    opacity: 0.5;
    transition: opacity 0.2s;
}

.visitor-card:hover::after { opacity: 1; }

/* Online-Card – gleiche Card, aber mit pulsierendem Dot */
.visitor-card.is-online::after {
    background: var(--blue-600);
    opacity: 1;
}

.visitor-online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-600);
    animation: onlinePulse 2s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 0.25rem;
}

@keyframes onlinePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 142, 240, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(59, 142, 240, 0); }
}

.visitor-card-icon {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.visitor-card-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--blue-600);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.visitor-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.15rem;
}

/* Skeleton für Counter */
.visitor-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
    gap: 0.6rem;
}

.visitor-skeleton-card {
    height: 85px;
    background: var(--bg-card);
    border-radius: var(--radius);
    animation: shimmer 1.5s infinite;
}

/* Chat placeholder (non-aspect-ratio) */
.lazy-embed-placeholder.chat-placeholder {
    aspect-ratio: auto;
    height: 420px;
}

/* ============================================================
   Scroll-to-Top Button
   ============================================================ */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-600);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
    z-index: 90;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--blue-500);
    transform: translateY(-2px);
}

.scroll-top svg { width: 20px; height: 20px; }

/* ============================================================
   CSS Konfetti Animation
   ============================================================ */

.milestone-banner {
    position: relative;
}

.confetti-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: var(--radius);
}

.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    top: -10px;
    animation: confettiFall linear forwards;
}

.confetti:nth-child(odd) { border-radius: 50%; }
.confetti:nth-child(even) { border-radius: 2px; }

.confetti:nth-child(1) { left: 5%; background: #3b8ef0; animation-duration: 2.5s; animation-delay: 0s; width: 6px; height: 6px; }
.confetti:nth-child(2) { left: 15%; background: #f59e0b; animation-duration: 2.8s; animation-delay: 0.2s; width: 10px; height: 10px; }
.confetti:nth-child(3) { left: 25%; background: #ef4444; animation-duration: 2.3s; animation-delay: 0.4s; }
.confetti:nth-child(4) { left: 35%; background: #22c55e; animation-duration: 2.6s; animation-delay: 0.1s; width: 7px; height: 7px; }
.confetti:nth-child(5) { left: 45%; background: #9147ff; animation-duration: 2.4s; animation-delay: 0.3s; width: 9px; height: 9px; }
.confetti:nth-child(6) { left: 55%; background: #3b8ef0; animation-duration: 2.7s; animation-delay: 0.5s; }
.confetti:nth-child(7) { left: 65%; background: #f59e0b; animation-duration: 2.2s; animation-delay: 0.15s; width: 6px; height: 6px; }
.confetti:nth-child(8) { left: 75%; background: #ef4444; animation-duration: 2.9s; animation-delay: 0.35s; width: 10px; height: 10px; }
.confetti:nth-child(9) { left: 85%; background: #22c55e; animation-duration: 2.5s; animation-delay: 0.25s; }
.confetti:nth-child(10) { left: 95%; background: #9147ff; animation-duration: 2.3s; animation-delay: 0.45s; width: 7px; height: 7px; }
.confetti:nth-child(11) { left: 10%; background: #1a6dd4; animation-duration: 2.6s; animation-delay: 0.6s; }
.confetti:nth-child(12) { left: 50%; background: #fbbf24; animation-duration: 2.4s; animation-delay: 0.7s; width: 8px; height: 8px; }

@keyframes confettiFall {
    0% { top: -10px; transform: rotate(0deg) translateX(0); opacity: 1; }
    25% { transform: rotate(90deg) translateX(15px); }
    50% { transform: rotate(180deg) translateX(-10px); }
    75% { transform: rotate(270deg) translateX(20px); opacity: 0.7; }
    100% { top: 100%; transform: rotate(360deg) translateX(-5px); opacity: 0; }
}

/* ============================================================
   Highlights Karussell (Startseite)
   ============================================================ */

.highlights-section {
    margin-bottom: 2rem;
}

.highlights-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.highlights-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.highlights-nav {
    display: flex;
    gap: 0.4rem;
}

.highlights-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.highlights-nav button:hover {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
}

.highlights-track-wrap {
    overflow: hidden;
    border-radius: var(--radius);
}

.highlights-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.4s ease;
    will-change: transform;
}

.highlight-card {
    flex: 0 0 280px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s;
}

.highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.highlight-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.highlight-thumb {
    position: relative;
    overflow: hidden;
}

.highlight-thumb img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.highlight-views {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.highlight-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.highlight-info {
    padding: 0.6rem 0.75rem;
}

.highlight-info h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.highlight-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   Gästebuch
   ============================================================ */

.gb-form { margin-bottom: 1.5rem; }
.gb-honeypot { position: absolute; left: -9999px; }
.gb-field { margin-bottom: 0.75rem; position: relative; }

.gb-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}

.gb-input:focus { border-color: var(--blue-600); }
.gb-textarea { resize: vertical; min-height: 80px; }

.gb-charcount {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gb-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding-left: 0.2rem;
}

.gb-submit {
    margin-top: 0.25rem;
    background: var(--blue-600);
    color: #fff;
}

.gb-submit:hover {
    box-shadow: 0 4px 12px rgba(26, 109, 212, 0.3);
}

/* Smiley Picker */
.smiley-wrap {
    position: relative;
    flex-shrink: 0;
}

.smiley-wrap-block {
    margin-bottom: 0.75rem;
}

.smiley-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: inherit;
    color: var(--blue-600);
    font-size: 0.85rem;
    font-weight: 600;
}

.smiley-toggle:hover {
    border-color: var(--blue-600);
    background: var(--bg-tab-hover);
}

.smiley-picker {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    width: 240px;
    flex-wrap: wrap;
    gap: 0.2rem;
}

.smiley-picker.open {
    display: flex;
}

.smiley-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s;
}

.smiley-btn:hover {
    background: var(--bg-tag);
    transform: scale(1.2);
}

.gb-status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2em;
}
.gb-status.error { color: var(--red); }
.gb-status.success { color: var(--blue-600); }

.gb-entries { margin-top: 1.5rem; }
.gb-loading, .gb-empty { text-align: center; color: var(--text-muted); padding: 2rem 0; }

.gb-entry {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.gb-entry:last-child { border-bottom: none; }
.gb-entry:hover { background: var(--bg-tag); border-radius: var(--radius); }

.gb-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.gb-entry-name { color: var(--blue-600); font-size: 0.9rem; }
.gb-entry-date { font-size: 0.75rem; color: var(--text-muted); }
.gb-entry-msg { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; word-break: break-word; }

.gb-pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 1rem;
}

.gb-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.gb-page-btn:hover, .gb-page-btn.active {
    background: var(--blue-600);
    color: #fff;
    border-color: var(--blue-600);
}

/* ============================================================
   Shoutbox (Index-Seite) – blau/weiß, schmal, hoch
   ============================================================ */

.shoutbox {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 0 auto 2rem;
    max-width: 100%;
    overflow: hidden;
    transition: background 0.3s;
    border: 1px solid var(--border-color);
}

.shoutbox-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.shoutbox-messages {
    min-height: 180px;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
}

.shoutbox-msg {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    line-height: 1.5;
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
}

.shoutbox-msg:hover { background: var(--bg-tag); }

.shoutbox-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 35px;
}

.shoutbox-name {
    font-weight: 700;
    color: var(--blue-600);
    flex-shrink: 0;
}

.shoutbox-text {
    color: var(--text-secondary);
    word-break: break-word;
}

.shoutbox-form {
    display: flex;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.shoutbox-form input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.shoutbox-form input:focus { border-color: var(--blue-600); }

.shoutbox-form input[name="sb-name"] { flex: 0 0 80px; }

.shoutbox-form button[type="submit"] {
    padding: 0.5rem 0.75rem;
    background: var(--blue-600);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.shoutbox-form button[type="submit"]:hover { background: var(--blue-500); }

.shoutbox-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.85rem;
}

/* ============================================================
   Admin Panel
   ============================================================ */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.admin-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
}

.admin-inline {
    display: inline-block;
}

.admin-inline .btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
}

/* ============================================================
   Login Page
   ============================================================ */

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.login-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.login-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.login-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

[data-theme="dark"] .login-error {
    background: #3b1111;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.login-form .gb-field { margin-bottom: 0.6rem; }

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.login-back {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
}

.login-back:hover { color: var(--blue-600); }

/* ============================================================
   Gästebuch Reply
   ============================================================ */

.gb-reply {
    margin-top: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-tag);
    border-radius: 8px;
    border-left: 3px solid var(--blue-600);
}

.gb-reply-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-600);
    margin-bottom: 0.25rem;
}

.gb-reply-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.gb-reply-form-wrap { margin-top: 0.5rem; }
.gb-reply-form-wrap summary { cursor: pointer; font-size: 0.78rem; }
.gb-reply-form { margin-top: 0.5rem; }
.gb-reply-form textarea { margin-bottom: 0.4rem; }

/* ============================================================
   Erfolgs-Animation (Checkmark)
   ============================================================ */

.gb-success-anim {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    animation: gbSuccessFade 0.5s ease;
}

@keyframes gbSuccessFade {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.gb-checkmark {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.gb-checkmark circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke: var(--blue-600);
    animation: gbCircle 0.6s ease forwards;
}

.gb-checkmark path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--blue-600);
    stroke-width: 3;
    stroke-linecap: round;
    animation: gbCheck 0.3s 0.4s ease forwards;
}

@keyframes gbCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes gbCheck {
    to { stroke-dashoffset: 0; }
}

/* ============================================================
   Cookie Banner
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner p { max-width: 600px; line-height: 1.5; }
.cookie-banner a { color: var(--blue-600); }

.cookie-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.cookie-btn-accept {
    background: var(--blue-600);
    color: #fff;
}

.cookie-btn-accept:hover { background: var(--blue-500); }

.cookie-btn-decline {
    background: var(--bg-tag);
    color: var(--text-secondary);
}

.cookie-btn-decline:hover { background: var(--border-color); }

/* ============================================================
   Breadcrumbs
   ============================================================ */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--blue-600);
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.breadcrumbs .bc-sep { color: var(--text-muted); }

.breadcrumbs .bc-current { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   404 Page
   ============================================================ */

.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--blue-600);
    line-height: 1;
    opacity: 0.3;
}

.error-page h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================================
   Ladezeit Footer
   ============================================================ */

.footer-loadtime {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============================================================
   Stream-Benachrichtigung Opt-in
   ============================================================ */

.notify-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--blue-500);
    transition: background 0.3s;
}

.notify-card-done {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notify-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.notify-content { flex: 1; min-width: 0; }

.notify-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.notify-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.notify-form {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.notify-input {
    flex: 1;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.notify-input:focus { border-color: var(--blue-600); }

.notify-btn {
    padding: 0.5rem 1rem;
    background: var(--blue-600);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.notify-btn:hover { background: var(--blue-500); }

/* ============================================================
   Responsive – Multi-Breakpoint + Hamburger Menu
   ============================================================ */

/* Hamburger Menu Button (hidden on desktop) */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--text-primary);
    border-radius: 2px;
}

/* Mobile overlay for nav */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.nav-overlay.show { display: block; }

/* ---- Tablet (max 1024px) ---- */
@media (max-width: 1024px) {
    .clips-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .stat-row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .welcome-hero { padding: 2.5rem 1.5rem; }
    .welcome-hero h1 { font-size: 1.8rem; }
    .vod-thumb img { width: 220px; }
}

/* ---- Mobile (max 768px) ---- */
@media (max-width: 768px) {
    .app { padding: 1rem; }

    /* Hamburger visible */
    .hamburger { display: flex; }

    /* Mobile Nav Drawer – simpel */
    .site-nav {
        position: relative;
    }

    .site-nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100%;
        background: var(--bg-nav);
        flex-direction: column;
        padding: 3rem 1.5rem 2rem;
        gap: 0.5rem;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        z-index: 999;
        overflow-y: auto;
    }

    .site-nav-links.open {
        display: flex;
    }

    .site-nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
        width: 100%;
        text-align: left;
        display: block;
    }

    .theme-toggle {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
        padding: 0.6rem;
    }

    /* Header */
    .header { flex-direction: column; text-align: center; padding: 1.25rem; gap: 1rem; }
    .header-avatar { width: 70px; height: 70px; }
    .header-info h1 { font-size: 1.3rem; }
    .header-info p { max-width: 100%; font-size: 0.85rem; }
    .header-stats { justify-content: center; gap: 1.25rem; }
    .header-stat .val { font-size: 1.2rem; }
    .header-buttons { justify-content: center; }

    /* Tabs – horizontal scroll */
    .nav-tabs {
        gap: 0.15rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tab { padding: 0.6rem 0.75rem; font-size: 0.8rem; flex: 0 0 auto; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

    /* Stats */
    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stat-card { padding: 0.9rem 0.6rem; }
    .stat-card .stat-value { font-size: 1.2rem; }
    .stat-card .stat-icon { font-size: 1.2rem; }

    /* Grids */
    .clips-grid { grid-template-columns: 1fr; gap: 1rem; }
    .shorts-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* VODs */
    .vod-card a { flex-direction: column; gap: 0; }
    .vod-thumb img { width: 100%; }
    .vod-info { padding: 0.75rem; }

    /* Schedule */
    .schedule-item { flex-direction: column; align-items: flex-start; gap: 0.25rem; padding: 0.75rem 1rem; }
    .schedule-date { min-width: auto; font-size: 0.85rem; }

    /* Misc */
    .last-stream-meta { flex-direction: column; gap: 0.25rem; }
    .live-banner .live-meta { flex-direction: column; gap: 0.3rem; }
    .welcome-hero { padding: 2rem 1.25rem; flex-direction: column; text-align: center; }
    .welcome-hero h1 { font-size: 1.5rem; }
    .welcome-hero p { font-size: 0.9rem; }
    .welcome-avatar { width: 70px; height: 70px; }
    .welcome-cards { grid-template-columns: 1fr; }
    .welcome-card { padding: 1.5rem 1rem; }
    .countdown-timer { font-size: 1.2rem; }
    .goal-current { font-size: 1.5rem; }
    .goal-target { font-size: 1.1rem; }

    /* Skeleton */
    .skeleton-header { flex-direction: column; text-align: center; }
    .skeleton-avatar { width: 70px; height: 70px; }
    .skeleton-grid { grid-template-columns: repeat(2, 1fr); }
    .skeleton-cards { grid-template-columns: 1fr; }
    .skeleton { padding: 1rem; }

    /* New features */
    .recent-followers { justify-content: center; }
    .live-now-banner { flex-direction: column; text-align: center; gap: 0.4rem; padding: 0.75rem 1rem; }
    .refresh-bar { font-size: 0.75rem; padding: 0.4rem 0.75rem; }

    /* Touch-friendly share buttons */
    .share-btn { width: 44px; height: 44px; font-size: 0.9rem; }

    /* Touch-friendly buttons */
    .btn { min-height: 44px; }
    .goal-login-btn { min-height: 44px; display: inline-flex; align-items: center; }
    .welcome-btn { min-height: 44px; }

    /* Footer links touch target */
    .footer a { display: inline-block; padding: 0.5rem 0.25rem; min-height: 44px; line-height: 2.5; }

    /* Stream embed */
    .stream-embed-wrap iframe { aspect-ratio: 16/9; }
    .chat-wrap iframe { height: 350px; }
    .lazy-embed-placeholder.chat-placeholder { height: 350px; }

    /* Footer */
    .footer { font-size: 0.75rem; margin-top: 2rem; }

    /* Cards */
    .card { padding: 1rem; }

    /* Goal overflow */
    .goal-numbers { flex-wrap: wrap; }

    /* Lazy embed text */
    .lazy-embed-placeholder { font-size: 0.9rem; flex-direction: column; text-align: center; padding: 1rem; }
    .lazy-embed-placeholder .play-icon { width: 40px; height: 40px; font-size: 1.2rem; }

    /* Refresh bar button touch target + flex-wrap */
    .refresh-bar { flex-wrap: wrap; }
    .refresh-bar button { padding: 0.4rem 0.8rem; font-size: 0.8rem; min-height: 44px; }

    /* Tags touch target */
    .tag { padding: 0.5rem 0.85rem; min-height: 44px; display: inline-flex; align-items: center; }

    /* Error box */
    .error-box { padding: 1rem; font-size: 0.85rem; }

    /* Toast */
    .toast { right: 0.75rem; left: 0.75rem; top: 0.75rem; text-align: center; }

    /* Load more */
    .load-more-btn { width: 100%; justify-content: center; padding: 0.75rem 1rem; }

    /* Scroll-to-Top */
    .scroll-top { bottom: 1.25rem; right: 1.25rem; }

    /* Highlights */
    .highlight-card { flex: 0 0 240px; }
    .highlights-nav button { width: 44px; height: 44px; }

    /* Smiley Picker */
    .smiley-picker { width: 220px; }
    .smiley-btn { width: 40px; height: 40px; }

    /* Notify */
    .notify-card { flex-direction: column; text-align: center; }
    .notify-form { justify-content: center; }
    .notify-input { min-width: 0; }

    /* Visitor Counter */
    .visitor-grid { grid-template-columns: repeat(3, 1fr); }
    .visitor-card { padding: 0.75rem 0.5rem; }
    .visitor-card-value { font-size: 1.2rem; }
}

/* ---- Small phones (max 480px) ---- */
@media (max-width: 480px) {
    .app { padding: 0.75rem; }

    .header { padding: 1rem; }
    .header-avatar { width: 60px; height: 60px; }
    .header-info h1 { font-size: 1.15rem; }
    .header-stat .val { font-size: 1rem; }
    .header-stat .lbl { font-size: 0.75rem; }

    .stat-row { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .stat-card { padding: 0.75rem 0.5rem; }
    .stat-card .stat-value { font-size: 1rem; }
    .stat-card .stat-label { font-size: 0.75rem; }

    .nav-tab { padding: 0.5rem 0.6rem; font-size: 0.75rem; }

    .welcome-hero { padding: 1.5rem 1rem; }
    .welcome-hero h1 { font-size: 1.3rem; }
    .welcome-avatar { width: 60px; height: 60px; }
    .welcome-btn { padding: 0.5rem 0.9rem; font-size: 0.82rem; }

    .shorts-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }

    .clip-info { padding: 0.6rem; }
    .clip-info h4 { font-size: 0.82rem; }

    .live-banner { padding: 1rem; }
    .live-banner h3 { font-size: 0.95rem; }

    .milestone-banner { font-size: 0.95rem; padding: 0.75rem 1rem; }
    .countdown-timer { font-size: 1rem; }

    .follower-avatar img { width: 40px; height: 40px; }
    .follower-avatar span { font-size: 0.75rem; max-width: 55px; }

    /* Skeleton */
    .skeleton-avatar { width: 60px; height: 60px; }
    .skeleton-header { padding: 1rem; }
    .skeleton-line.h24 { height: 18px; }

    /* Cards & misc */
    .card { padding: 0.75rem; }
    .card-title { font-size: 0.95rem; margin-bottom: 0.75rem; }
    .goal-card { padding: 1rem; }
    .last-stream-card { padding: 0.75rem; }
    .load-more-btn { font-size: 0.82rem; }
    .video-stats { gap: 0.5rem; }
    .share-btn { width: 44px; height: 44px; }
    .refresh-bar { flex-wrap: wrap; gap: 0.3rem; }
    .quota-warning { font-size: 0.78rem; padding: 0.5rem 0.75rem; }

    /* Visitor Counter */
    .visitor-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
    .visitor-card-value { font-size: 1rem; }
    .visitor-card-label { font-size: 0.75rem; }
    .visitor-card-icon { font-size: 1.1rem; }

    /* Highlights */
    .highlight-card { flex: 0 0 220px; }

    /* Scroll-to-Top */
    .scroll-top { bottom: 1rem; right: 1rem; width: 40px; height: 40px; }
}