/* =============================================
   LUCKY SPIN — Main Stylesheet
   Colors: #C7000B (red), #b5b5b6 (silver)
   BG: #1A1A1A, Card: #242424
   ============================================= */

/* ─── Variables ─── */
:root {
    --red:         #C7000B;
    --red-dark:    #A0000A;
    --red-glow:    rgba(199, 0, 11, 0.18);
    --red-glow2:   rgba(199, 0, 11, 0.08);
    --silver:      #b5b5b6;
    --silver-lt:   #D9D9D9;
    --bg:          #1A1A1A;
    --bg-card:     #242424;
    --bg-hover:    #2E2E2E;
    --bg-deep:     #111111;
    --border:      rgba(181, 181, 182, 0.15);
    --border-hover:rgba(181, 181, 182, 0.35);
    --text:        #FFFFFF;
    --text-sec:    #b5b5b6;
    --text-dim:    #6b6b6b;
    --sidebar-w:   240px;
    --radius:      10px;
    --radius-sm:   6px;
    --shadow:      0 4px 24px rgba(0,0,0,0.45);
    --shadow-red:  0 4px 20px rgba(199,0,11,0.3);
    --trans:       all 0.2s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ─── Typography ─── */
h1,h2,h3,h4 { font-family: 'Arial', sans-serif; letter-spacing: 0.4px; line-height: 1.15; }

/* ─── Particle Canvas ─── */
.particle-canvas {
    position: fixed; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
}

/* =========================================
   HELLO PAGE
   ========================================= */
.hello-body {
    background: var(--bg-deep);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
}
.hello-container {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    gap: 60px; padding: 40px 20px;
    max-width: 900px; width: 100%;
}
/* Decorative wheel */
.hello-wheel-wrap {
    position: relative; flex-shrink: 0;
    width: 220px; height: 220px;
    display: flex; align-items: center; justify-content: center;
}
.hello-wheel {
    width: 200px; height: 200px; border-radius: 50%;
    position: relative; overflow: hidden;
    border: 6px solid var(--silver);
    animation: helloSpin 12s linear infinite;
    box-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(0,0,0,0.5);
}
@keyframes helloSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.wheel-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 3px solid rgba(181,181,182,0.3);
}
.wheel-segment {
    position: absolute; width: 0; height: 0;
    top: 50%; left: 50%;
    transform-origin: 0 0;
}
.wheel-segment::before {
    content: ''; position: absolute;
    width: 100px; height: 100px;
    background: var(--red);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.hello-wheel { background: conic-gradient(
    #C7000B 0deg 60deg, #1A1A1A 60deg 120deg,
    #C7000B 120deg 180deg, #1A1A1A 180deg 240deg,
    #C7000B 240deg 300deg, #1A1A1A 300deg 360deg
); }
.wheel-center {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    width: 36px; height: 36px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--silver-lt), var(--silver));
    box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 3px rgba(255,255,255,0.2);
    z-index: 10;
}
.hello-pointer {
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 22px solid var(--red);
    filter: drop-shadow(0 0 6px var(--red));
    z-index: 20;
}
/* Hello text */
.hello-content { position: relative; z-index: 1; }
.hello-sub {
    font-size: 0.85rem; letter-spacing: 3px; text-transform: uppercase;
    color: var(--silver); margin-bottom: 8px;
}
.hello-title {
    font-family: 'Arial', sans-serif; font-size: 5.5rem;
    font-weight: 700; line-height: 0.9;
    color: var(--text);
    text-shadow: 0 0 40px var(--red-glow);
}
.hello-title span { color: var(--red); }
.hello-desc {
    font-size: 0.95rem; color: var(--text-sec);
    margin: 18px 0 32px; line-height: 1.7;
}
.btn-hello {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--red); color: #fff;
    padding: 14px 32px; border-radius: 50px;
    font-size: 1rem; font-weight: 600; letter-spacing: 0.5px;
    text-decoration: none; transition: var(--trans);
    box-shadow: var(--shadow-red);
}
.btn-hello:hover {
    background: var(--red-dark); transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(199,0,11,0.45);
}

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-body {
    background: var(--bg-deep); overflow: hidden;
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px; padding: 40px 36px;
    box-shadow: var(--shadow), 0 0 60px rgba(199,0,11,0.08);
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 70px; height: 70px; border-radius: 50%;
    background: rgba(199,0,11,0.1); border: 2px solid var(--red-glow);
    margin-bottom: 16px;
}
.login-title { font-size: 2.2rem; font-family: 'Arial', sans-serif; font-weight: 700; }
.login-subtitle { color: var(--text-sec); font-size: 0.9rem; margin-top: 4px; }
.login-error {
    display: flex; align-items: center; gap: 8px;
    background: rgba(199,0,11,0.1); border: 1px solid rgba(199,0,11,0.3);
    border-left: 3px solid var(--red);
    color: #ff6b6b; padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.875rem; margin-bottom: 20px;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--silver-lt); }
.input-wrap { position: relative; }
.input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-dim); pointer-events: none;
}
.form-input {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text); font-family: 'Inter', sans-serif;
    font-size: 0.925rem; padding: 11px 40px 11px 38px;
    transition: var(--trans); outline: none;
}
.form-input:focus {
    border-color: var(--red); background: rgba(199,0,11,0.04);
    box-shadow: 0 0 0 3px var(--red-glow);
}
.form-input::placeholder { color: var(--text-dim); }
.btn-eye {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; padding: 4px; transition: var(--trans);
}
.btn-eye:hover { color: var(--silver); }
.btn-login {
    width: 100%; padding: 13px; background: var(--red);
    border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: var(--trans);
    box-shadow: var(--shadow-red); letter-spacing: 0.5px;
}
.btn-login:hover { background: var(--red-dark); transform: translateY(-1px); }
.login-back {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    color: var(--text-dim); font-size: 0.85rem; text-decoration: none;
    margin-top: 20px; transition: var(--trans);
}
.login-back:hover { color: var(--silver); }

/* =========================================
   ADMIN LAYOUT
   ========================================= */
.admin-body { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w); min-height: 100vh;
    background: #111; border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 12px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
}
.logo-icon-wrap {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(199,0,11,0.12); display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-text {
    font-family: 'Arial', sans-serif; font-size: 1.4rem;
    font-weight: 600; letter-spacing: 1px; color: var(--text);
}
.sidebar-nav {
    display: flex; flex-direction: column; gap: 2px;
    padding: 14px 10px; flex: 1;
}
.nav-item, .nav-logout {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--radius-sm);
    color: var(--text-sec); text-decoration: none;
    font-size: 0.9rem; font-weight: 500; transition: var(--trans);
    border: 1px solid transparent;
    cursor: pointer; background: none; width: 100%; text-align: left;
}
.nav-item:hover, .nav-logout:hover {
    background: var(--bg-hover); color: var(--text);
    border-color: var(--border);
}
.nav-item.active {
    background: var(--red-glow2); color: var(--text);
    border-color: rgba(199,0,11,0.25);
    border-left: 3px solid var(--red);
}
.nav-item.active .nav-icon { color: var(--red); }
.nav-icon { flex-shrink: 0; display: flex; align-items: center; }
.sidebar-footer {
    padding: 10px 10px 16px;
    border-top: 1px solid var(--border);
}
.nav-logout:hover { color: #ff6b6b; }

/* Hamburger */
.hamburger {
    display: none; position: fixed; top: 16px; left: 16px; z-index: 200;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; padding: 10px; cursor: pointer; flex-direction: column; gap: 5px;
}
.hamburger span {
    display: block; width: 20px; height: 2px;
    background: var(--text); border-radius: 2px; transition: var(--trans);
}
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 99; backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* Main content */
.main-content {
    margin-left: var(--sidebar-w); flex: 1;
    padding: 28px 32px; min-height: 100vh;
}
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; gap: 12px; flex-wrap: wrap;
}
.page-title { font-size: 2rem; font-weight: 600; }
.page-body { display: flex; flex-direction: column; gap: 20px; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1.15rem; font-weight: 600; }
.card-link { color: var(--red); font-size: 0.85rem; text-decoration: none; transition: var(--trans); }
.card-link:hover { color: var(--red-dark); }
.card-body { padding: 20px; }
.card-body.p0 { padding: 0; }

/* ─── Stats ─── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: var(--trans);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-red { background: rgba(199,0,11,0.12); color: var(--red); }
.stat-icon-silver { background: rgba(181,181,182,0.1); color: var(--silver); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-family: 'Arial', sans-serif; font-size: 2.2rem; line-height: 1; font-weight: 600; }
.stat-label { font-size: 0.8rem; color: var(--text-sec); margin-top: 2px; }

/* ─── Quick actions ─── */
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); text-decoration: none; font-size: 0.9rem;
    font-weight: 500; transition: var(--trans);
}
.quick-btn:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.quick-btn-primary {
    background: var(--red); border-color: var(--red);
    box-shadow: var(--shadow-red);
}
.quick-btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

/* ─── Table ─── */
.table { width: 100%; border-collapse: collapse; }
.table th {
    background: var(--red); color: #fff;
    padding: 12px 16px; text-align: left;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.6px;
    text-transform: uppercase;
}
.table th:first-child { border-radius: 0; }
.table td {
    padding: 13px 16px; border-bottom: 1px solid var(--border);
    font-size: 0.9rem; vertical-align: middle;
}
.table tbody tr { transition: var(--trans); }
.table tbody tr:hover { background: rgba(199,0,11,0.04); }
.table tbody tr:last-child td { border-bottom: none; }

/* ─── Buttons ─── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--red); color: #fff; border: none;
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: var(--trans); text-decoration: none;
    box-shadow: 0 2px 10px rgba(199,0,11,0.25);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 7px;
    background: transparent; color: var(--silver);
    border: 1px solid var(--border);
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; cursor: pointer;
    transition: var(--trans); text-decoration: none;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); background: var(--bg-hover); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-icon {
    background: none; border: 1px solid var(--border); border-radius: 6px;
    padding: 7px; cursor: pointer; transition: var(--trans);
    display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon-silver { color: var(--silver); }
.btn-icon-silver:hover { border-color: var(--silver); color: var(--text); background: var(--bg-hover); }
.btn-icon-red { color: var(--silver); }
.btn-icon-red:hover { border-color: var(--red); color: var(--red); background: rgba(199,0,11,0.08); }

/* ─── Action buttons group ─── */
.action-btns { display: flex; gap: 6px; }

/* ─── Badges ─── */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px;
}
.badge-red { background: rgba(199,0,11,0.15); color: #ff6b6b; border: 1px solid rgba(199,0,11,0.3); }
.badge-silver { background: rgba(181,181,182,0.1); color: var(--silver); border: 1px solid var(--border); }

/* ─── Text helpers ─── */
.text-red { color: var(--red); }
.text-silver { color: var(--text-sec); }
.text-dim { color: var(--text-dim); font-style: italic; }
.text-winner { color: #fff; font-weight: 600; }
.text-sm { font-size: 0.82rem; }
.fw600 { font-weight: 600; }
.label-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
}
.label-row .form-label { margin-bottom: 0; }
.winner-cell { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.winner-cell svg { color: var(--red); flex-shrink: 0; }

/* ─── Empty state ─── */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    gap: 14px; padding: 52px 20px; color: var(--text-dim); text-align: center;
}
.empty-state p { font-size: 0.95rem; }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    display: none; align-items: center; justify-content: center;
    z-index: 500; backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; width: 90%; max-width: 460px;
    box-shadow: var(--shadow); animation: modalIn 0.2s ease;
}
.modal-lg { max-width: 600px; }

/* Input không có icon — dùng trong modal */
.form-input-plain {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-family: 'Inter', sans-serif;
    font-size: 0.925rem; padding: 11px 14px;
    transition: var(--trans); outline: none;
}
.form-input-plain:focus {
    border-color: var(--red); background: rgba(199,0,11,0.04);
    box-shadow: 0 0 0 3px var(--red-glow);
}
.form-input-plain::placeholder { color: var(--text-dim); }
.modal-separator {
    border: none; border-top: 1px solid var(--border); margin: 4px 0;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: none; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 1.2rem; font-weight: 600; }
.modal-close {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; padding: 4px; border-radius: 6px; transition: var(--trans);
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); background: var(--bg-hover); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 16px 22px; border-top: 1px solid var(--border);
}
.form-hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 4px; }
.required { color: var(--red); }

/* ─── Side panel ─── */
.panel-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: none; z-index: 400; backdrop-filter: blur(2px);
}
.panel-overlay.show { display: flex; justify-content: flex-end; }
.side-panel {
    width: 400px; max-width: 95vw; height: 100vh;
    background: var(--bg-card); border-left: 1px solid var(--border);
    display: flex; flex-direction: column;
    animation: panelIn 0.25s ease;
}
@keyframes panelIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.panel-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 22px; border-bottom: 1px solid var(--border);
}
.panel-sub { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.panel-title { font-size: 1.2rem; font-weight: 600; }
.panel-body { flex: 1; padding: 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.panel-footer {
    display: flex; gap: 10px; padding: 16px 22px;
    border-top: 1px solid var(--border);
}
.panel-footer .btn-primary { flex: 1; justify-content: center; }
.form-textarea {
    width: 100%; background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-family: 'Inter', sans-serif;
    font-size: 0.9rem; padding: 12px; resize: none;
    flex: 1; min-height: 300px; outline: none; transition: var(--trans);
    line-height: 1.8;
}
.form-textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.form-textarea::placeholder { color: var(--text-dim); }
.participant-count {
    font-size: 0.82rem; color: var(--red); font-weight: 600;
    text-align: right;
}

/* ─── Toast ─── */
#toast-container {
    position: fixed; bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px; z-index: 9999;
}
.toast {
    padding: 13px 18px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 500; max-width: 320px;
    opacity: 0; transform: translateY(10px) scale(0.97);
    transition: all 0.25s ease; box-shadow: var(--shadow);
    border-left: 3px solid;
}
.toast.show { opacity: 1; transform: none; }
.toast-success {
    background: #1a2a1a; color: #6fcf97;
    border-color: #6fcf97;
}
.toast-error {
    background: #2a1a1a; color: #ff6b6b;
    border-color: var(--red);
}

/* ─── Game layout (spin control) ─── */
.game-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}
.game-board-wrap, .game-control-wrap { display: flex; flex-direction: column; }

/* Progress bar */
.game-progress-bar {
    height: 3px; background: var(--border);
    overflow: hidden;
}
.game-progress-fill {
    height: 100%; background: var(--red);
    transition: width 0.5s ease;
    border-radius: 0 2px 2px 0;
}
.progress-badge {
    font-size: 0.8rem; color: var(--text-sec); font-weight: 600;
}
.progress-badge span:first-child { color: var(--red); font-size: 1rem; }

/* Prize board list */
.prize-board-list { display: flex; flex-direction: column; }
.prize-board-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: none; border-left: none; border-right: none; border-top: none;
    cursor: pointer; transition: var(--trans); width: 100%; text-align: left;
    position: relative;
}
.prize-board-item:last-child { border-bottom: none; }
.prize-board-item:hover { background: var(--bg-hover); }
.prize-board-item.active {
    background: var(--red-glow2);
    border-left: 3px solid var(--red) !important;
    padding-left: 15px;
}
.prize-board-item.is-done { opacity: 0.75; }
.prize-board-item.is-done:hover { opacity: 1; }

.pboard-icon {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    font-size: 0.8rem; font-weight: 700; color: var(--text-sec);
    transition: var(--trans);
}
.pboard-icon-done {
    background: rgba(111,207,151,0.15); border-color: rgba(111,207,151,0.4);
    color: #6fcf97;
}
.pboard-info { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pboard-name { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pboard-winner {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.78rem; color: #6fcf97; font-weight: 600;
}
.pboard-winner svg { flex-shrink: 0; }
.pboard-meta { font-size: 0.78rem; color: var(--text-sec); }
.pboard-warn { font-size: 0.78rem; color: #f2994a; }
.pboard-arrow { color: var(--text-dim); flex-shrink: 0; transition: var(--trans); }
.prize-board-item.active .pboard-arrow,
.prize-board-item:hover .pboard-arrow { color: var(--red); }

/* Right control panel */
.control-hint {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 40px 20px; color: var(--text-dim); text-align: center;
}
.control-hint p { font-size: 0.9rem; line-height: 1.7; }

.selected-prize-card {
    background: rgba(199,0,11,0.05); border: 1px solid rgba(199,0,11,0.2);
    border-radius: var(--radius-sm); padding: 18px; margin-bottom: 16px;
}
.selected-label { font-size: 0.72rem; color: var(--text-sec); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 6px; }
.selected-name { font-family: 'Arial', sans-serif; font-size: 1.7rem; font-weight: 600; line-height: 1.1; margin-bottom: 14px; }
.selected-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.selected-meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.8px; }
.meta-value { font-size: 0.9rem; font-weight: 600; }

.respun-warn {
    display: flex; align-items: flex-start; gap: 8px;
    background: rgba(242,153,74,0.08); border: 1px solid rgba(242,153,74,0.3);
    border-left: 3px solid #f2994a;
    border-radius: var(--radius-sm); padding: 10px 12px;
    font-size: 0.82rem; color: #f2994a; margin-bottom: 14px;
}
.respun-warn svg { flex-shrink: 0; margin-top: 1px; }

.btn-spin {
    width: 100%; padding: 18px; font-size: 1.2rem; font-family: 'Arial', sans-serif;
    font-weight: 600; letter-spacing: 2px;
    background: var(--red); color: #fff; border: none;
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--trans);
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: var(--shadow-red);
}
.btn-spin:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(199,0,11,0.4); }

.spinning-indicator {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 36px 20px; color: var(--text-sec); text-align: center;
}
.spin-anim {
    width: 52px; height: 52px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--red);
    animation: rotate 0.8s linear infinite;
}
.spin-text { font-size: 1rem; color: var(--text); font-weight: 500; }
@keyframes rotate { to { transform: rotate(360deg); } }

.result-box {
    background: rgba(199,0,11,0.05); border: 1px solid rgba(199,0,11,0.2);
    border-radius: var(--radius-sm); padding: 22px; text-align: center; margin-bottom: 16px;
}
.result-title { font-size: 1.1rem; margin-bottom: 4px; }
.result-prize-name { font-size: 0.85rem; color: var(--text-sec); margin-bottom: 16px; }
.result-winner-box {
    display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 12px;
}
.result-winner-label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.result-winner-name { font-family: 'Arial', sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--red); line-height: 1; }
.result-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-finish { width: 100%; justify-content: center; padding: 13px; font-size: 1rem; }

/* =========================================
   DISPLAY PAGE (Projector / Fullscreen)
   ========================================= */
.display-body {
    background: var(--bg-deep); overflow: hidden;
    min-height: 100vh; display: flex; flex-direction: column;
    position: relative;
}
.display-bg-canvas {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.display-header {
    position: relative; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 40px; border-bottom: 1px solid var(--border);
    background: rgba(17,17,17,0.8); backdrop-filter: blur(10px);
}
.display-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Arial', sans-serif; font-size: 1.4rem; font-weight: 600;
}
.display-prize-label {
    font-family: 'Arial', sans-serif; font-size: 1.6rem; font-weight: 600;
    color: var(--silver); letter-spacing: 1px;
    text-align: right;
}
.display-prize-label.active { color: var(--red); animation: prizePulse 2s ease-in-out infinite; }
@keyframes prizePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.7; } }

.display-main {
    flex: 1; display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 5; padding: 20px;
}

/* Idle */
.display-idle {
    display: flex; flex-direction: column; align-items: center; gap: 24px;
    text-align: center;
}
.idle-wheel-anim {
    position: relative; width: 160px; height: 160px;
    display: flex; align-items: center; justify-content: center;
}
.idle-ring {
    position: absolute; border-radius: 50%;
    border: 2px solid var(--red); opacity: 0.4;
    animation: idlePulse 2.5s ease-in-out infinite;
}
.idle-ring-1 { width: 80px; height: 80px; animation-delay: 0s; }
.idle-ring-2 { width: 120px; height: 120px; animation-delay: 0.4s; opacity: 0.25; }
.idle-ring-3 { width: 160px; height: 160px; animation-delay: 0.8s; opacity: 0.12; }
@keyframes idlePulse {
    0%,100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.08); opacity: 0.6; }
}
.idle-center { position: relative; z-index: 5; animation: idleSpin 20s linear infinite; }
@keyframes idleSpin { to { transform: rotate(360deg); } }
.idle-title { font-family: 'Arial', sans-serif; font-size: 2.5rem; font-weight: 600; }
.idle-subtitle { color: var(--text-sec); font-size: 1rem; }

/* Spinning – Wheel stage */
.display-spinning { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wheel-stage {
    position: relative; display: flex;
    align-items: center; justify-content: center;
}
.wheel-pointer-wrap {
    position: absolute; top: -18px; left: 50%;
    transform: translateX(-50%); z-index: 20;
}
.wheel-pointer-arrow {
    width: 0; height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 38px solid var(--red);
    filter: drop-shadow(0 0 12px rgba(199,0,11,0.9)) drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}
.wheel-outer-ring {
    border-radius: 50%; padding: 8px;
    background: conic-gradient(from 0deg, #888, #d0d0d0, #666, #c8c8c8, #888, #d0d0d0, #666, #888);
    box-shadow: 0 0 60px rgba(199,0,11,0.2), 0 0 120px rgba(0,0,0,0.6);
    animation: ringGlow 3s ease-in-out infinite;
}
@keyframes ringGlow {
    0%,100% { box-shadow: 0 0 40px rgba(199,0,11,0.15), 0 0 80px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 70px rgba(199,0,11,0.35), 0 0 120px rgba(0,0,0,0.5); }
}
#wheelCanvas { display: block; border-radius: 50%; }

/* Winner overlay */
.winner-overlay {
    position: fixed; inset: 0; z-index: 900;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    animation: overlayIn 0.5s ease;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.winner-card {
    background: var(--bg-card); border: 2px solid var(--red);
    border-radius: 20px; padding: 52px 64px; text-align: center;
    max-width: 600px; width: 90%;
    box-shadow: 0 0 80px rgba(199,0,11,0.4), var(--shadow);
    position: relative; overflow: hidden;
    animation: winnerCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes winnerCardIn {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}
.winner-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.winner-icon { font-size: 3.5rem; margin-bottom: 12px; display: block; animation: iconBounce 0.6s ease 0.3s both; }
@keyframes iconBounce { from { transform: scale(0); } to { transform: scale(1); } }
.winner-prize-label { font-size: 0.9rem; letter-spacing: 2px; text-transform: uppercase; color: var(--silver); margin-bottom: 10px; }
.winner-name {
    font-family: 'Arial', sans-serif; font-size: 4.5rem; font-weight: 700;
    color: var(--red); line-height: 1;
    text-shadow: 0 0 40px rgba(199,0,11,0.5);
    animation: namePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes namePop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
.winner-divider { width: 60px; height: 3px; background: var(--red); margin: 20px auto; border-radius: 2px; }
.winner-sub { color: var(--text-sec); font-size: 1rem; }
.confetti-piece {
    position: absolute; width: 8px; height: 8px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .game-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }
    .sidebar.open { transform: translateX(0); }
    .hamburger { display: flex; }
    .main-content { margin-left: 0; padding: 70px 16px 20px; }
    .stats-grid { grid-template-columns: 1fr; gap: 12px; }
    .hello-container { flex-direction: column; text-align: center; gap: 32px; }
    .hello-title { font-size: 4rem; }
    .display-header { padding: 14px 20px; }
    .wheel-outer-ring { padding: 5px; }
    #wheelCanvas { width: 320px !important; height: 320px !important; }
    .winner-name { font-size: 3rem; }
    .winner-card { padding: 36px 28px; }
    .side-panel { width: 100%; }
    .table th, .table td { padding: 10px 12px; font-size: 0.82rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .login-card { padding: 30px 22px; }
    .display-prize-label { font-size: 1.1rem; }
    .winner-name { font-size: 2.4rem; }
}
