/* ═══════════════════════════════════════════════════════════════
   DJ Jukebox — Stylesheet
   
   DESIGN RULES:
   - MINIMUM 20px for ALL visible text
   - HIGH CONTRAST: white/bright text on dark backgrounds
   - NO subtle, muted, or pastel text colors
   - Labels and values must be BOLD
   - Designed for dark rooms, drunk people, old eyes
   - Nunito sans-serif — round, clean, maximum readability
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg: #111122;
    --bg2: #0d0d1a;
    --card: rgba(255,255,255,0.07);
    --border: rgba(255,255,255,0.15);
    --gold: #ffd475;
    --gold-bright: #ffe8a8;
    --white: #ffffff;
    --white-soft: #f0ede8;
    --green: #5dfc7a;
    --red: #ff5555;
    --ff: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
    font-family: var(--ff);
    font-size: 20px;
    color: var(--white);
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease-out; }

/* ─── Public Page Wrapper ────────────────────────────────────── */
.jb-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.jb-card {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 40px 32px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.jb-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,212,117,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ─── Hero Header ────────────────────────────────────────────── */
.jb-hero { position: relative; margin-bottom: 6px; }
.jb-dj-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}
.jb-presents {
    font-size: 20px;
    font-weight: 400;
    color: var(--white-soft);
    font-style: italic;
    margin: 4px 0 8px;
}
.jb-icon { font-size: 60px; margin-bottom: 8px; position: relative; }
.jb-title {
    font-size: 38px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
    position: relative;
}
.jb-divider { text-align: center; margin: 14px 0; opacity: 0.35; position: relative; }

/* ─── Form Fields ────────────────────────────────────────────── */
.jb-field { text-align: left; margin-bottom: 20px; position: relative; }
.jb-label {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}
.jb-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    font-size: 22px;
    font-weight: 600;
    font-family: var(--ff);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.jb-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(255,212,117,0.25);
}
.jb-input::placeholder { color: rgba(255,255,255,0.4); font-size: 20px; }
textarea.jb-input { resize: vertical; min-height: 70px; line-height: 1.4; }

/* ─── Tip Section ────────────────────────────────────────────── */
.jb-tip-section {
    margin-bottom: 20px;
    padding: 22px 20px;
    background: rgba(255,212,117,0.08);
    border: 2px dashed rgba(255,212,117,0.3);
    border-radius: 16px;
    position: relative;
}
.jb-tip-header { margin-bottom: 14px; }
.jb-tip-note {
    font-size: 18px;
    color: var(--white-soft);
    margin-top: 4px;
}
.jb-tip-wrap {
    display: flex;
    align-items: center;
}
.jb-dollar {
    font-size: 36px;
    font-weight: 800;
    color: var(--gold);
    padding-right: 8px;
}
.jb-tip-input {
    font-size: 36px !important;
    font-weight: 800 !important;
    text-align: center;
    padding: 14px 16px !important;
    letter-spacing: 2px;
    color: var(--gold) !important;
}
.jb-quick-tips {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.jb-quick {
    flex: 1;
    padding: 16px 0;
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
    font-family: var(--ff);
    cursor: pointer;
    transition: all 0.15s;
}
.jb-quick:hover, .jb-quick:active {
    background: rgba(255,212,117,0.2);
    border-color: var(--gold);
    transform: scale(1.05);
}

/* ─── Buttons ────────────────────────────────────────────────── */
.jb-btn {
    display: block;
    width: 100%;
    padding: 22px;
    border: none;
    border-radius: 14px;
    font-size: 24px;
    font-weight: 800;
    font-family: var(--ff);
    cursor: pointer;
    margin-top: 14px;
    background: linear-gradient(135deg, var(--gold), #e8b84a);
    color: var(--bg);
    letter-spacing: 0.5px;
    transition: transform 0.1s, box-shadow 0.2s;
    position: relative;
}
.jb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255,212,117,0.35);
}

.jb-secure {
    font-size: 18px;
    color: var(--white-soft);
    margin-top: 14px;
    position: relative;
}
.jb-error {
    background: rgba(255,85,85,0.2);
    color: var(--red);
    padding: 16px 18px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}
.jb-success, .jb-canceled { position: relative; padding: 20px 0; }
.jb-success h2 { font-size: 32px; font-weight: 800; color: var(--gold); margin: 10px 0 8px; }
.jb-success p { font-size: 22px; color: var(--white); }

/* ═══════════════════════════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
.jb-admin-wrap { min-height: 100vh; }
.jb-admin-header {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    padding: 18px 24px;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.jb-admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 960px;
    margin: 0 auto;
}
.jb-admin-title { font-size: 28px; font-weight: 800; color: var(--gold); }
.jb-admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jb-admin-btn {
    display: inline-block;
    padding: 12px 22px;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: transparent;
    color: var(--gold);
    font-weight: 800;
    font-size: 18px;
    font-family: var(--ff);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.jb-admin-btn:hover { background: rgba(255,212,117,0.12); }
.jb-admin-logout {
    padding: 12px 22px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    background: transparent;
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
    font-family: var(--ff);
    cursor: pointer;
}

/* ─── Tabs ───────────────────────────────────────────────────── */
.jb-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 24px;
    background: rgba(255,255,255,0.03);
    border-bottom: 2px solid var(--border);
    max-width: 960px;
    margin: 0 auto;
}
.jb-tab {
    padding: 14px 22px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    font-weight: 800;
    font-family: var(--ff);
    text-decoration: none;
    transition: all 0.15s;
}
.jb-tab:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.jb-tab-active { background: rgba(255,212,117,0.15); color: var(--gold); }

.jb-admin-body { max-width: 960px; margin: 0 auto; padding: 24px; }

/* ─── Stats ──────────────────────────────────────────────────── */
.jb-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}
.jb-stat-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
}
.jb-stat-icon { font-size: 32px; margin-bottom: 4px; }
.jb-stat-num { font-size: 34px; font-weight: 800; color: var(--gold); }
.jb-stat-label { font-size: 18px; font-weight: 600; color: var(--white); margin-top: 4px; }

/* ─── Section Titles ─────────────────────────────────────────── */
.jb-section-title { font-size: 26px; font-weight: 800; color: var(--gold); margin-bottom: 14px; }
.jb-empty { color: var(--white-soft); font-size: 20px; }

/* ─── Request Cards ──────────────────────────────────────────── */
.jb-request-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 22px;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.jb-queue { border-left: 6px solid var(--gold); }
.jb-played-card { opacity: 0.4; }
.jb-request-info { flex: 1; min-width: 200px; }

/* Labeled rows */
.jb-request-row {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
    line-height: 1.3;
}
.jb-row-label {
    color: var(--gold);
    font-weight: 800;
}
.jb-row-value {
    color: var(--white);
    font-weight: 800;
}
.jb-row-highlight {
    font-size: 26px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255,212,117,0.1);
    border-radius: 8px;
}
.jb-row-small {
    font-size: 20px;
    font-weight: 600;
    color: var(--white-soft);
    margin-top: 6px;
}

.jb-request-dedication {
    font-size: 24px;
    color: var(--white);
    font-weight: 800;
    margin-top: 10px;
    font-style: italic;
    line-height: 1.4;
    padding: 14px 18px;
    background: rgba(255,255,255,0.08);
    border-left: 6px solid var(--gold);
    border-radius: 8px;
}

.jb-played-btn {
    padding: 16px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--green), #27c95a);
    color: var(--bg);
    font-size: 20px;
    font-weight: 800;
    font-family: var(--ff);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.1s;
}
.jb-played-btn:hover { transform: translateY(-2px); }

/* ─── Settings ───────────────────────────────────────────────── */
.jb-settings-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 20px;
}
.jb-settings-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
}
.jb-settings-desc {
    font-size: 18px;
    font-weight: 600;
    color: var(--white-soft);
    margin-bottom: 16px;
    line-height: 1.5;
}
.jb-settings-msg {
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}
.jb-msg-ok { background: rgba(93,252,122,0.12); color: var(--green); }
.jb-msg-err { background: rgba(255,85,85,0.12); color: var(--red); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

/* Prevent iOS zoom on input focus */
@media (max-width: 768px) {
    input, select, textarea { font-size: 18px !important; }
    input[type="number"] { font-size: 28px !important; }
}

/* Tablet (768px) */
@media (max-width: 768px) {
    .jb-wrapper { padding: 12px; }
    .jb-card { padding: 32px 22px; max-width: 100%; }
    .jb-title { font-size: 32px; }
    .jb-dj-name { font-size: 28px; }
    .jb-presents { font-size: 18px; }
    .jb-icon { font-size: 52px; }
    .jb-label { font-size: 20px; }
    .jb-input { font-size: 20px; }
    .jb-tip-input { font-size: 30px !important; }
    .jb-quick { font-size: 22px; padding: 14px 0; }
    .jb-btn { font-size: 22px; padding: 20px; }

    .jb-tabs { padding: 6px 16px; }
    .jb-tab { font-size: 18px; padding: 12px 16px; flex: 1; text-align: center; }

    .jb-admin-header { padding: 14px 16px; }
    .jb-admin-header-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .jb-admin-actions { width: 100%; }
    .jb-admin-btn, .jb-admin-logout { flex: 1; text-align: center; font-size: 16px; padding: 12px 14px; }
    .jb-admin-body { padding: 16px; }

    .jb-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    .jb-request-card { flex-direction: column; align-items: stretch; padding: 18px; }
    .jb-request-info { min-width: 0; width: 100%; }
    .jb-played-btn { width: 100%; text-align: center; margin-top: 12px; }

    .jb-settings-card { padding: 22px 18px; }
}

/* Small phones (480px) */
@media (max-width: 480px) {
    .jb-wrapper { padding: 8px; }
    .jb-card { padding: 24px 14px; border-radius: 18px; }
    .jb-title { font-size: 28px; }
    .jb-dj-name { font-size: 24px; }
    .jb-presents { font-size: 17px; }
    .jb-icon { font-size: 44px; }
    .jb-label { font-size: 20px; }
    .jb-input { padding: 14px 12px; }
    .jb-tip-input { font-size: 26px !important; }
    .jb-dollar { font-size: 30px; }
    .jb-quick { font-size: 20px; padding: 13px 0; }
    .jb-quick-tips { gap: 6px; }
    .jb-btn { font-size: 20px; padding: 18px; }
    .jb-secure { font-size: 16px; }

    .jb-success h2 { font-size: 26px; }
    .jb-success p { font-size: 20px; }

    .jb-admin-title { font-size: 22px; }
    .jb-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
    .jb-stat-card { padding: 16px 10px; }
    .jb-stat-num { font-size: 26px; }
    .jb-stat-label { font-size: 16px; }

    .jb-section-title { font-size: 22px; }
    .jb-request-row { font-size: 22px; }
    .jb-row-highlight { font-size: 24px; }
    .jb-row-small { font-size: 18px; }
    .jb-request-dedication { font-size: 22px; padding: 12px 14px; }
    .jb-request-card { padding: 14px 12px; }
}

/* Very small phones (360px — older Androids, iPhone SE) */
@media (max-width: 360px) {
    .jb-card { padding: 20px 12px; border-radius: 14px; }
    .jb-title { font-size: 24px; }
    .jb-dj-name { font-size: 22px; }
    .jb-icon { font-size: 38px; }
    .jb-tip-input { font-size: 24px !important; }
    .jb-quick { font-size: 18px; padding: 12px 0; }
    .jb-btn { font-size: 20px; padding: 16px; }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    .jb-wrapper { align-items: flex-start; padding-top: 10px; }
    .jb-card { padding: 20px 24px; }
    .jb-icon { font-size: 36px; margin-bottom: 4px; }
    .jb-title { font-size: 26px; }
    .jb-divider { margin: 6px 0; }
    .jb-field { margin-bottom: 12px; }
    .jb-input { padding: 12px 14px; }
    .jb-btn { padding: 16px; }
    .jb-glow { display: none; }
}

/* Large desktop */
@media (min-width: 1200px) {
    .jb-card { max-width: 540px; }
    .jb-admin-body { max-width: 1000px; }
}
