

body.dark-mode {
color:#ffffff;
background:
radial-gradient(ellipse at 20% 15%, rgba(124, 58, 237, 0.10) 0%, transparent 55%),
radial-gradient(ellipse at 80% 85%, rgba(0, 255, 200, 0.08) 0%, transparent 55%),
radial-gradient(ellipse at 50% 50%, rgba(255, 0, 128, 0.04) 0%, transparent 70%),
linear-gradient(160deg, #0a0a14 0%, #0f0f1e 50%, #08080f 100%);
background-color: #0a0a14;
/* background-attachment: fixed DIHAPUS — diabaikan/dipecah browser HP
   dan bikin bagian bawah halaman tidak terlukis (strip putih). */
}





.biru-btn,
.merah-btn,
.kuning-btn,
.hijau-btn {
color: #fff; border: none; padding: 12px 24px; font-size: 15px; font-weight: 700; border-radius: 12px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); letter-spacing: 0.3px;
}
.kuning-btn {
background: linear-gradient(135deg, #f1c40f 0%, #b8860b 100%); box-shadow: 0 4px 16px rgba(241, 196, 15, 0.3);
}
.kuning-btn:hover {
background: linear-gradient(135deg, #f7d94c 0%, #c99a10 100%); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(241, 196, 15, 0.5);
}
.biru-btn {
background: linear-gradient(135deg, #2196f3 0%, #0d47a1 100%); box-shadow: 0 4px 16px rgba(33, 150, 243, 0.3);
}
.biru-btn:hover {
background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(33, 150, 243, 0.5);
}
.merah-btn {
background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.merah-btn:hover {
background: linear-gradient(135deg, #f87171 0%, #dc2626 100%); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
}
.hijau-btn {
background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.hijau-btn:hover {
background: linear-gradient(135deg, #34d399 0%, #10b981 100%); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
}

.btn-dashboard {
    position: relative;   /* ★ jangkar dropdown Rules */
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 5px auto;
    max-width: 500px;
    flex-wrap: wrap;
}

/* Lebar tombol Play/Pause dikunci agar tidak berubah saat label berganti */
#btnStart {
    min-width: 96px;
    text-align: center;
}


.grid-box {
    display: grid;
    grid-template-columns: repeat(10, 46px);			
    gap: 4px;
	/* //width: max-content;
	//margin: 0px auto; */
    border-radius: 4px;
	justify-content: center; 
    transition: all 0.1s ease;
    /* //background-color: #fffafa; */
}
/* Base Style Box Utama (Default: BG #3498db, Font Putih) */
.box {
    height: 46px;
    background-color: var(--box-bg, #0099ff);
    color: var(--box-color, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, color 0.3s, box-shadow 0.2s;
    position: relative;
    border-radius: 2px;
    z-index: 1;
}

/* Style Kotak Utama yang Terpilih (Default: BG Kuning, Font Hitam) */
.box.selected {
    background-color: var(--selected-bg, #f1c40f) !important;
    color: var(--selected-color, #000000) !important;
    font-weight: bold;
    transform: scale(1.01);
    border-radius: 2px;
}

/* Style Animasi Shuffle - Glowing Effect & Scale */
.box.shuffling {
    animation: shuffle 0.2s ease-in-out infinite alternate !important;
    z-index: 10 !important;
}

@keyframes shuffle {
    0% {
        transform: scale(1.1);
        box-shadow: 0 0 12px #ffd700, 0 0 4px #ffb300;
        outline: 2px solid #ffd700;
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 16px #ffea00, 0 0 6px #ffc400;
        outline: 2px solid #ffea00;
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 12px #ffe066, 0 0 4px #ffaa00;
        outline: 2px solid #ffe066;
    }
}

/* History Box Container */
.history-container {
    max-width: 520px;
    height: 104px;
    margin: 10px auto;
    padding: 1px;
}

#historyList {		
    min-height: 46px;
    display: grid;
    grid-template-columns: repeat(10, 46px);
    justify-content: center;
    gap: 4px;
    padding: 0;
    margin: 0;
}

#historyList li {
    font-size: 24px;
    font-weight: bold;
    width: 46px;
    height: 46px;
    background-color: var(--history-bg, #f1c40f); 
    color: var(--history-color, #000000); 
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 2px;        
    list-style: none;
    box-shadow: 0 4px 10px rgba(108, 92, 231, 0.4);
}

/* Custom Panel Container */
.panel-container {
    max-width: 500px;
    margin: 10px auto;
    background: #1e2638;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider-group {
    margin-bottom: 12px;
    text-align: left;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 5px;
}

.slider-input {
    width: 100%;
    cursor: pointer;
    accent-color: #3498db;
}

/* Style Custom Color Pickers */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.color-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.color-item input[type="color"] {
    
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.color-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-item input[type="color"]::-webkit-color-swatch {
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
}

/* ==========================================
   NAVBAR (TEMA BACKGROUND)
   ========================================== */
.praya-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(10, 10, 15, 0.55);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.praya-nav .brand {
    flex: 0 0 auto;
    font-size: 1.7rem;
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    background: linear-gradient(90deg, #a78bfa, #22d3ee, #f472b6, #a78bfa);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: brandShimmer 6s linear infinite;
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.35));
}
@keyframes brandShimmer {
    to { background-position: 300% 0; }
}
.praya-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}
@media (max-width: 480px) {
    .praya-nav { padding: 8px 12px; }
    .praya-nav .brand { font-size: 1.4rem; }
}

/* ==========================================
   RESPONSIF: kartu angka & history (10 kolom TETAP, posisi angka tidak berubah)
   ========================================== */
.grid-box {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    width: 100%;
    max-width: 496px;
    margin: 0 auto;
    box-sizing: border-box;
}
.box {
    height: auto;
    aspect-ratio: 1 / 1;
    font-size: clamp(12px, 5vw, 24px);
}
#historyList {
    grid-template-columns: repeat(10, minmax(0, 1fr));
    width: 100%;
    max-width: 496px;
    margin: 0 auto;
    box-sizing: border-box;
}
#historyList li {
    width: auto;
    height: auto;
    aspect-ratio: 1 / 1;
    font-size: clamp(12px, 5vw, 24px);
}

/* ==========================================
   ★ RULES DROPDOWN (tombol di samping tombol Reset)
   Klik tombol Rules → panel turun berisi rules yang bisa diedit & disalin.
   Panel diposisikan tengah di bawah baris tombol supaya tidak keluar layar HP.
   ========================================== */
.rules-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    width: min(300px, calc(100vw - 32px));
    padding: 10px;
    box-sizing: border-box;
    text-align: left;
    background: rgba(12, 12, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Saat tertutup panel benar-benar hilang dari layout & tidak bisa diklik */
.rules-dropdown[hidden] {
    display: none;
}

.rules-text {
    display: block;
    width: 100%;
    min-height: 104px;
    padding: 8px 10px;
    box-sizing: border-box;
    color: #e2e8f0;
    background: #12181f;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.55;
    resize: vertical;
    outline: none;
}

.rules-text:focus {
    border-color: rgba(241, 196, 15, 0.85);
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.25);
}

.rules-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.rules-actions > button {
    flex: 1 1 0;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 8px;
    line-height: 1.2;
}