/* ============================================================
   HOME — Homepage layout, stream grid, shop grid
   ============================================================ */
.hp-shell { display:flex; max-width:1440px; margin:0 auto; padding:0 18px 18px; }
.hp-sidebar { width:220px; flex:0 0 220px; padding:22px 0; position:sticky; top:70px; height:fit-content; align-self:start; }
.hp-main { flex:1 1 0; min-width:0; padding:24px 0 0 24px; }

.hp-sidebar-greeting { padding:0 12px 16px; font-size:16px; font-weight:800; line-height:1.3; }
.hp-sidebar-greeting span { color:var(--accent); }
.hp-nav-section { margin-bottom:6px; }
.hp-nav-section-title { padding:14px 12px 6px; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.hp-nav-item { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; font-size:14px; font-weight:600; color:var(--text); cursor:pointer; transition:.14s; border:1px solid transparent; text-decoration:none; }
.hp-nav-item:hover, .hp-nav-item.active { background:var(--accent-soft); border-color:var(--line); color:var(--text); }
.hp-nav-item.active { font-weight:800; color:var(--accent); border-color:color-mix(in srgb, var(--accent) 24%, var(--line)); }
.hp-nav-item .icon { font-size:16px; width:22px; text-align:center; }
.hp-nav-divider { border:0; border-top:1px solid var(--line-soft); margin:10px 14px; }
.hp-auth-box { padding:10px 14px; display:flex; flex-direction:column; gap:8px; }
.hp-auth-box .btn { justify-content:center; min-height:40px; font-size:13px; }

.live-dot { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px; font-size:11px; font-weight:800; background:rgba(220,38,38,.10); color:#dc2626; border:1px solid rgba(220,38,38,.22); }
.live-dot::before { content:''; width:7px; height:7px; border-radius:50%; background:#ef4444; animation:livepulse 1.4s ease-in-out infinite; }

.hp-section { margin-bottom:34px; }
.hp-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.hp-section-title { font-size:20px; font-weight:900; display:flex; align-items:center; gap:10px; letter-spacing:0; }
.hp-section-link { font-size:13px; color:var(--accent); font-weight:700; text-decoration:none; }
.hp-section-link:hover { color:var(--accent-2); }

.stream-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; }
.stream-card { border-radius:8px; overflow:hidden; border:1px solid var(--line); background:var(--surface); transition:.18s; text-decoration:none; color:var(--text); display:block; box-shadow:0 1px 2px rgba(17,24,39,.05); }
.stream-card:hover { transform:translateY(-3px); box-shadow:0 14px 30px rgba(17,24,39,.13); border-color:color-mix(in srgb, var(--accent) 38%, var(--line)); }
.stream-header { display:flex; align-items:center; gap:8px; padding:8px 10px 6px; }
.stream-shop-avatar { width:30px; height:30px; border-radius:50%; background:linear-gradient(135deg,var(--accent-warm),var(--accent)); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:900; color:#111827; flex-shrink:0; }
.stream-shop-name { font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.stream-thumb { position:relative; aspect-ratio:3/4; background:var(--bg-soft); overflow:hidden; }
.stream-thumb img { width:100%; height:100%; object-fit:cover; }
.stream-thumb-placeholder { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:48px; background:linear-gradient(160deg,rgba(47,109,246,.10),rgba(245,212,66,.18)); }
.stream-badge-row { position:absolute; top:8px; left:8px; right:8px; display:flex; align-items:center; justify-content:space-between; }
.stream-thumb-sched { position:absolute; bottom:8px; left:8px; background:rgba(17,24,39,.82); color:#fff; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:700; }
.stream-info { padding:9px 10px 12px; }
.stream-title { font-size:13px; font-weight:800; line-height:1.35; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; margin-bottom:4px; }
.stream-category { font-size:12px; color:var(--accent-2); font-weight:600; }
.viewers-badge { background:rgba(17,24,39,.82); color:#fff; padding:3px 7px; border-radius:999px; font-size:11px; font-weight:800; display:flex; align-items:center; gap:3px; }
.viewers-badge::before { content:'👁'; font-size:10px; }

.shop-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:14px; }
.shop-card { border-radius:8px; border:1px solid var(--line); background:var(--surface); overflow:hidden; transition:.18s; text-decoration:none; color:var(--text); box-shadow:0 1px 2px rgba(17,24,39,.05); }
.shop-card:hover { transform:translateY(-2px); box-shadow:0 12px 26px rgba(17,24,39,.12); border-color:color-mix(in srgb, var(--accent-2) 35%, var(--line)); }
.shop-banner { height:86px; background:linear-gradient(135deg,rgba(47,109,246,.14),rgba(245,212,66,.24)); overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:28px; }
.shop-banner img { width:100%; height:100%; object-fit:cover; }
.shop-info { padding:12px 14px 14px; }
.shop-name { font-size:15px; font-weight:800; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.shop-meta { font-size:12px; color:var(--muted); }

.hp-empty { padding:40px 24px; text-align:center; color:var(--muted); border:1px dashed var(--line); border-radius:8px; background:var(--surface); }
.hp-empty .icon { font-size:40px; margin-bottom:10px; }
.hp-empty p { font-size:14px; line-height:1.6; }

/* ── Enhanced empty state ── */
.hp-empty-hero {
    padding: 56px 32px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16,185,129,.05), rgba(56,189,248,.04));
}
.hp-empty-hero .icon { font-size: 52px; display: block; margin-bottom: 18px; }
.hp-empty-hero h3 { font-size: 22px; font-weight: 900; margin: 0 0 10px; color: var(--text); }
.hp-empty-hero p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 400px; margin: 0 auto 22px; }
.hp-empty-hero .nav-links { justify-content: center; }

/* ── Stream/shop card skeleton states ── */
.stream-card-skel {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}
.stream-card-skel-thumb {
    aspect-ratio: 3/4;
    background: linear-gradient(
        90deg,
        var(--surface-2, rgba(148,163,184,.1)) 25%,
        rgba(148,163,184,.22) 50%,
        var(--surface-2, rgba(148,163,184,.1)) 75%
    );
    background-size: 800px 100%;
    animation: skel-shimmer 1.5s infinite linear;
}
.stream-card-skel-body { padding: 9px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.stream-card-skel-line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(
        90deg,
        var(--surface-2, rgba(148,163,184,.1)) 25%,
        rgba(148,163,184,.22) 50%,
        var(--surface-2, rgba(148,163,184,.1)) 75%
    );
    background-size: 800px 100%;
    animation: skel-shimmer 1.5s infinite linear;
}
.stream-card-skel-line--60 { width: 60%; }
.stream-card-skel-line--80 { width: 80%; }
@keyframes skel-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.hp-hero { padding:20px 24px; border-radius:8px; background:var(--surface); border:1px solid var(--line); margin-bottom:28px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; box-shadow:var(--shadow); }
.hp-hero-copy h2 { font-size:26px; font-weight:900; margin:0 0 6px; }
.hp-hero-copy p { margin:0; color:var(--muted); font-size:14px; }
.hp-hero-actions { display:flex; gap:10px; flex-wrap:wrap; }

@media(max-width:1100px){ .hp-sidebar { width:180px; flex:0 0 180px; } }
@media(max-width:860px){ .hp-sidebar { display:none; } .hp-main { padding-left:0; } }
@media(max-width:600px){ .stream-grid { grid-template-columns:repeat(2,1fr); } .shop-grid { grid-template-columns:1fr 1fr; } }
