* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --accent: #f59e0b;
    --accent-glow: #fbbf24;
    --danger: #ef4444;
    --success: #10b981;
    --dark-bg: #070d1f;
    --card-glass: rgba(15, 23, 42, 0.78);
}

/* =========================================
   LATAR BELAKANG ANIMASI BERPUTAR
   ========================================= */
body.bg-animasi {
    background: radial-gradient(circle at center, #0f294a 0%, #050a18 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.sunburst-wrapper {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sunburst {
    width: 220vmax;
    height: 220vmax;
    background: repeating-conic-gradient(
        from 0deg,
        rgba(56, 189, 248, 0.08) 0deg 10deg,
        transparent 10deg 20deg
    );
    animation: putarLatar 45s linear infinite;
}

.ring-orbit {
    position: fixed;
    width: 85vmin;
    height: 85vmin;
    border: 2px dashed rgba(251, 191, 36, 0.18);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: putarOrbit 30s linear infinite reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes putarLatar {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes putarOrbit {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* =========================================
   HALAMAN LOGIN & REGISTER
   ========================================= */
.auth-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card-glass);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 32px 28px;
    width: 100%;
    max-width: 410px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header i {
    font-size: 48px;
    color: var(--accent-glow);
}

.auth-header h2 {
    margin-top: 8px;
    font-size: 22px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.form-control:focus {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.12);
}

.form-control:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-control option {
    background: #0f172a;
    color: #fff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.2s, filter 0.2s;
    text-decoration: none;
}

.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #0284c7, #2563eb); color: #fff; }
.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.btn-outline { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); }

.btn-loading,
.btn:disabled,
button.btn-loading {
    opacity: 0.72;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================================
   LAYAR PROYEKTOR (KIRI NOMOR, KANAN HADIAH)
   ========================================= */
.projector-layout {
    position: relative;
    z-index: 2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 32px;
    overflow: hidden;
}

.projector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.projector-title {
    font-size: clamp(22px, 3vw, 38px);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #fde047);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.projector-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 28px;
    align-items: center;
    padding: 20px 0;
    min-height: 0;
}

/* PANEL KIRI: TEMPAT NOMOR DIPUTAR */
.panel-kiri {
    background: var(--card-glass);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(56, 189, 248, 0.35);
    border-radius: 28px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 0 50px rgba(2, 132, 199, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-height: 540px;
}

.label-tahap {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #38bdf8;
    font-weight: 700;
    margin-bottom: 18px;
}

.kotak-nomor {
    background: linear-gradient(180deg, #061024 0%, #0f254a 100%);
    border: 4px solid var(--accent-glow);
    border-radius: 22px;
    padding: 34px 20px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 0 35px rgba(251, 191, 36, 0.35);
    margin-bottom: 22px;
    position: relative;
}

.angka-undian {
    font-size: clamp(54px, 7.5vw, 115px);
    font-weight: 900;
    letter-spacing: 6px;
    color: #fde047;
    text-shadow: 0 4px 20px rgba(250, 204, 21, 0.6);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.kotak-nomor.sedang-berputar {
    animation: denyutKotak 0.35s infinite alternate;
    border-color: #38bdf8;
}

@keyframes denyutKotak {
    from { transform: scale(0.99); box-shadow: 0 0 20px rgba(56, 189, 248, 0.4); }
    to   { transform: scale(1.015); box-shadow: 0 0 45px rgba(56, 189, 248, 0.9); }
}

.nama-pemenang-box {
    min-height: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nama-pemenang {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 800;
    color: #fff;
}

.ket-pemenang {
    font-size: 18px;
    color: #94a3b8;
    margin-top: 4px;
}

/* PANEL KANAN: HADIAH UTAMA */
.panel-kanan {
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(16px);
    border: 2px solid rgba(251, 191, 36, 0.45);
    border-radius: 28px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 0 50px rgba(245, 158, 11, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 540px;
}

.badge-kategori {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.wadah-gambar-hadiah {
    width: 240px;
    height: 240px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    animation: melayangHadiah 3.5s ease-in-out infinite;
}

.wadah-gambar-hadiah img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wadah-gambar-hadiah i {
    font-size: 110px;
    color: var(--accent-glow);
}

@keyframes melayangHadiah {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.judul-hadiah-utama {
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 800;
    color: #fde047;
    line-height: 1.25;
}

.projector-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 14px;
    overflow: hidden;
}

/* =========================================
   REMOTE KONTROL HP (ADMIN)
   ========================================= */
.remote-wrapper {
    position: relative;
    z-index: 2;
    max-width: 620px;
    margin: 0 auto;
    padding: 14px 14px 85px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: var(--card-glass);
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 14px;
}

.card-remote {
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}

.card-remote h3 {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #38bdf8;
}

.tombol-besar-putar {
    height: 76px;
    font-size: 20px;
    letter-spacing: 1px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0b132b;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    z-index: 20;
}

.bottom-nav button {
    flex: 1;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 10px 4px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.bottom-nav button.active {
    color: #38bdf8;
    font-weight: 700;
}

.bottom-nav button i { font-size: 22px; }

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.badge-status {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.bg-menang { background: #10b981; color: #fff; }
.bg-gugur { background: #ef4444; color: #fff; }
.bg-aktif { background: #0284c7; color: #fff; }

@media (max-width: 820px) {
    .projector-layout {
        height: auto;
        min-height: 100vh;
        padding: 16px;
        overflow-y: auto;
    }

    .projector-header {
        flex-wrap: wrap;
    }

    .projector-main {
        grid-template-columns: 1fr;
    }

    .panel-kiri,
    .panel-kanan {
        max-height: none;
        padding: 24px 18px;
    }

    .wadah-gambar-hadiah {
        width: 190px;
        height: 190px;
    }
}