/* ============================================================
   PeepGuys — Mobile-first CSS
   Design: dark theme, 2-6 column responsive performer grid
   ============================================================ */

/* ── Custom properties ─────────────────────────────────────── */
:root {
    --bg:            #0d0d0d;
    --surface:       #181818;
    --surface-hover: #1f1f1f;
    --border:        #2a2a2a;
    --text:          #f0f0f0;
    --text-muted:    #888;
    --accent:        #e91e8c;   /* hot pink */
    --accent-hover:  #c2185b;
    --online:        #4caf50;
    --live-red:      #e53935;
    --radius:        8px;
    --card-radius:   8px;
    --transition:    0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Site Header ───────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #111;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
}

.site-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.header-right { display: flex; align-items: center; gap: 16px; }

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 5px var(--online);
    flex-shrink: 0;
}

/* ── Refresh progress bar ──────────────────────────────────── */
.refresh-bar {
    height: 2px;
    background: var(--border);
    overflow: hidden;
}

.refresh-bar-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
}

/* ── Section header ────────────────────────────────────────── */
.section-header {
    padding: 16px 16px 8px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.section-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Performer Grid ────────────────────────────────────────── */
.performer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px 10px 24px;
}

@media (min-width: 480px) {
    .performer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .performer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        padding: 10px 16px 28px;
    }
}

@media (min-width: 1024px) {
    .performer-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1400px) {
    .performer-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Performer Card ────────────────────────────────────────── */
.performer-card {
    display: block;
    background: var(--surface);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.performer-card:hover,
.performer-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    outline: none;
}

.performer-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #111;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.performer-card:hover .card-thumb img {
    transform: scale(1.06);
}

/* Badges on thumbnail */
.badge-live,
.badge-hd,
.badge-viewers {
    position: absolute;
    border-radius: 3px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 5px;
}

.badge-live {
    top: 5px;
    left: 5px;
    background: var(--live-red);
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-hd {
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 9px;
    text-transform: uppercase;
}

.badge-viewers {
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
}

/* Card text */
.card-info {
    padding: 6px 8px 8px;
}

.card-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.card-platform {
    font-size: 11px;
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ── Load More button ──────────────────────────────────────── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    padding: 16px 16px 32px;
}

.btn-load-more {
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--transition), border-color var(--transition);
}

.btn-load-more:hover:not(:disabled),
.btn-load-more:focus-visible:not(:disabled) {
    color: var(--text);
    border-color: var(--text-muted);
    outline: none;
}

.btn-load-more:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Performer Profile Page ────────────────────────────────── */
.profile-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.profile-layout {
    display: grid;
    gap: 24px;
}

@media (min-width: 640px) {
    .profile-layout {
        grid-template-columns: minmax(0, 380px) 1fr;
        align-items: start;
    }
}

.profile-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    background: #111;
}

.profile-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

@media (min-width: 640px) { .profile-name { font-size: 30px; } }

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.profile-status.is-live { color: var(--online); }

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--online);
    box-shadow: 0 0 7px var(--online);
}

/* Tags */
.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    list-style: none;
}

.tag {
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 100px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

/* Meta table */
.profile-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin-top: 16px;
    font-size: 13px;
}

.profile-meta dt { color: var(--text-muted); }
.profile-meta dd { color: var(--text); }

/* CTA button */
.btn-watch {
    display: inline-block;
    margin-top: 20px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 22px;
    border-radius: var(--radius);
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-watch:hover,
.btn-watch:focus-visible {
    background: var(--accent-hover);
    outline: none;
}

.profile-handle {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ── Site Footer ───────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 24px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 40px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }
