/* Font & Global Settings */
:root {
    /* Sultan Royale Palette - Deep Maroon, Metallic Gold, Diamond White */
    --bg-royale-dark: #120102;
    --bg-royale-vivid: #32060b;
    --velvet-maroon: #5e0b13;
    
    --gold-bright: #fff585;
    --gold-rich: #d4af37;
    --gold-deep: #8a6d3b;
    --gold-shadow: rgba(184, 134, 11, 0.6);
    
    --diamond-glow: rgba(255, 255, 255, 0.8);
    
    --text-gold: #fcf6ba;
    --text-muted: #a17b80;
    
    --btn-royale: linear-gradient(180deg, var(--gold-bright), var(--gold-rich), var(--gold-deep));
    
    --shadow-luxury: 
        0 20px 40px rgba(0,0,0,0.8),
        0 5px 15px rgba(212, 175, 55, 0.2);
        
    --shadow-glow: 0 0 30px var(--gold-shadow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: 
        radial-gradient(circle at center, rgba(18, 1, 2, 0.4) 0%, rgba(18, 1, 2, 0.95) 100%),
        url("luxury_casino_bg_royale_1775189163543.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-gold);
    overflow: hidden;
    position: relative;
}

/* Container */
.app-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    position: relative;
    z-index: 10;
}

/* Header */
header {
    text-align: center;
    animation: fadeInDown 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

header h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -2px;
    background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold-rich) 50%, var(--gold-deep) 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    text-transform: uppercase;
}

header p {
    color: var(--text-gold);
    opacity: 0.8;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
}

/* Wheel Layout */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
    animation: zoomIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wheel-outer-ring {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    /* 3D Metallic Gold Ring */
    background: conic-gradient(
        from 0deg,
        var(--gold-deep) 0deg,
        var(--gold-bright) 45deg,
        var(--gold-rich) 90deg,
        var(--gold-bright) 135deg,
        var(--gold-deep) 180deg,
        var(--gold-bright) 225deg,
        var(--gold-rich) 270deg,
        var(--gold-bright) 315deg,
        var(--gold-deep) 360deg
    );
    box-shadow: 
        var(--shadow-luxury),
        inset 0 0 15px rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--gold-rich);
}

@media (min-width: 450px) {
    .wheel-outer-ring {
        width: 400px;
        height: 400px;
    }
}

/* Casino LED Lights Array */
.wheel-lights {
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

  /* --- VIP SULTAN MODE EFFECTS --- */
.wheel-outer-ring.sultan-mode {
    border-color: #ffd700;
}

.sultan-aura {
    position: absolute;
    top: -30px; left: -30px; right: -30px; bottom: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 100, 0, 0.2) 60%, transparent 80%);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.sultan-mode .sultan-aura {
    opacity: 1;
    animation: sultanAuraPulse 1s infinite alternate ease-in-out;
}

@keyframes sultanAuraPulse {
    0% { transform: scale(1); filter: blur(20px) contrast(1.2); }
    100% { transform: scale(1.1); filter: blur(35px) contrast(1.8); }
}

.sultan-sparks {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    z-index: 10;
    pointer-events: none;
}

.spark {
    position: absolute;
    width: 2px;
    height: 15px;
    background: #fff;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #fff;
    border-radius: 2px;
    opacity: 0;
    animation: sparkFlash 0.3s ease-out forwards;
}

@keyframes sparkFlash {
    0% { transform: scaleY(0) rotate(var(--angle)) translateY(0); opacity: 1; }
    100% { transform: scaleY(1.5) rotate(var(--angle)) translateY(-40px); opacity: 0; }
}

/* Original Sultan Pulse enhancement for container itself */
.wheel-outer-ring.sultan-mode {
    animation: sultanContainerPulse 0.4s infinite alternate;
}

@keyframes sultanContainerPulse {
    0% { box-shadow: 0 0 20px #ff6600, 0 0 40px #ffcc00, inset 0 0 20px rgba(255, 102, 0, 0.4); }
    100% { box-shadow: 0 0 60px #ff0000, 0 0 100px #ffcc00, inset 0 0 40px rgba(255, 0, 0, 0.6); }
}

.light-bulb {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff, 0 0 10px var(--gold-light), inset 0 0 2px #fff;
    left: 50%;
    top: 0;
    margin-left: -4px; /* center it */
    transform-origin: 50% 185px; /* Radius minus inset padding */
    animation: blinkLight 1.5s infinite alternate;
}

@media (min-width: 450px) {
    .light-bulb {
        transform-origin: 50% 215px; /* Larger radius scale */
    }
}

.light-bulb:nth-child(even) {
    animation-delay: -0.7s;
    background: var(--gold-light);
    box-shadow: 0 0 5px var(--gold-light), 0 0 10px var(--gold-main);
}

@keyframes blinkLight {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.3); } /* Need transform origin to stick? Wait, transform overrides scale. We apply scale in the parent? No, we will animate opacity only for stability since transform rotates it. */
}

/* Proper Light Animation (opacity only to keep transform intact) */
@keyframes blinkLightSafe {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}
.light-bulb {
    animation: blinkLightSafe 0.5s infinite alternate;
}

/* Glowing Aura behind Wheel */
.wheel-outer-ring::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px; right: -20px; bottom: -20px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 223, 112, 0.4), rgba(212, 175, 55, 0.2));
    z-index: -1;
    filter: blur(25px);
    animation: pulseAura 4s ease-in-out infinite alternate;
}

/* Cinematic Enhancements */
.royale-vignette {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 5;
}

.cinematic-spotlight {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 3;
    filter: blur(40px);
}

.wheel-container {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}

/* 3D Glass Cover Effect - The Secret Sauce */
.glossy-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.4);
}

/* Center Golden Cap */
/* Center Golden Cap */
.wheel-inner-ring {
    position: absolute;
    width: 60px;
    height: 60px;
    background: conic-gradient(var(--gold-bright), var(--gold-rich), var(--gold-deep), var(--gold-bright));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 10px 30px rgba(0,0,0,0.6), 
        inset 0 0 10px rgba(0,0,0,0.5);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--gold-bright);
}
.wheel-inner-ring::after {
    content: '';
    width: 35px;
    height: 35px;
    /* Diamond Center */
    background: radial-gradient(circle at 30% 30%, #fff 0%, #ddd 40%, #999 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 15px var(--diamond-glow),
        inset 0 0 10px rgba(0,0,0,0.3);
}

/* Dynamic Pointer */
.pointer {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    /* Red Diamond Casino Arrow */
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 50px solid #e53e3e;
    z-index: 10;
    transform-origin: 50% 0; /* Rotate from top */
    transition: transform 0.05s ease-out; /* Very fast snappy tick */
    filter: drop-shadow(0 8px 8px rgba(0,0,0,0.3)) drop-shadow(0 -2px 1px rgba(255,255,255,0.5));
}

.pointer.ticking {
    transform: translateX(-50%) rotate(-12deg); 
}

/* Golden Spin Button */
.spin-btn {
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--btn-royale);
    color: #120102; /* Contrast dark */
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4), inset 0 2px 5px rgba(255,255,255,0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: luxePulse 2s infinite;
}

@keyframes luxePulse {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 15px 45px rgba(212, 175, 55, 0.7); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4); }
}

#spin-btn:hover {
    transform: scale(1.1) translateY(-5px);
}

#spin-btn:active {
    transform: scale(0.95);
}

#spin-btn:disabled {
    filter: grayscale(1);
    opacity: 0.7;
    cursor: not-allowed;
    animation: none;
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    transition: left 0.7s ease;
}

.spin-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 35px -5px rgba(212, 175, 55, 0.6);
}

.spin-btn:hover::before {
    left: 100%;
}

.spin-btn:active {
    transform: translateY(2px) scale(0.97);
    box-shadow: 0 5px 15px -5px rgba(212, 175, 55, 0.6);
}

.spin-btn:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    border-color: transparent;
    text-shadow: none;
}

/* Light Glassmorphism Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(20px); /* Heavy fog */
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.modal-backdrop.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-royale-vivid), var(--bg-royale-dark));
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 35px 80px rgba(0,0,0,0.8), inset 0 0 15px rgba(212, 175, 55, 0.2);
    width: 95%;
    max-width: 420px;
    transform: translateY(0) scale(1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--gold-rich);
    color: var(--text-gold);
}

.modal-backdrop.hidden .modal-content {
    transform: translateY(40px) scale(0.85); 
}

.modal-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
}

.modal-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gold-bright);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.modal-content p {
    font-size: 1.1rem;
    color: var(--text-gold);
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.5;
}

#reward-text strong {
    color: var(--gold-bright);
    font-size: 1.8rem;
    display: block;
    margin-top: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 15px var(--gold-shadow);
}

#welcome-modal ul li {
    color: var(--text-gold);
}

#welcome-modal strong {
    color: var(--gold-bright);
    font-weight: 900;
}

.modal-btn {
    background: var(--text-primary);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(212, 175, 55, 0.4);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0px); }
}

@keyframes shineText {
    to { background-position: 200% center; }
}

@keyframes pulseAura {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.05); opacity: 0.8; }
}

/* Luxury Dust Blobs */
.luxury-dust {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
    opacity: 0.5;
    animation: moveBlob 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.dust-1 { top: -10%; left: -10%; width: 400px; height: 400px; background: rgba(212, 175, 55, 0.3); animation-delay: 0s; }
.dust-2 { bottom: -20%; right: -10%; width: 500px; height: 500px; background: rgba(255, 223, 112, 0.3); animation-delay: -5s; }
.dust-3 { top: 40%; left: 50%; width: 300px; height: 300px; background: rgba(255, 255, 255, 0.6); animation-duration: 30s; }

@keyframes moveBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 40px) scale(1.05); }
    100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Gold Ornaments Floating */
.ornament {
    position: absolute;
    color: var(--gold-light);
    z-index: 1;
    opacity: 0.9;
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.8));
    animation: floatOrn 4s ease-in-out infinite alternate;
}

.ornament.orn-1 { top: 15%; left: 10%; font-size: 1.8rem; animation-delay: 0s; }
.ornament.orn-2 { top: 70%; left: 5%; font-size: 2.8rem; animation-delay: -1.5s; }
.ornament.orn-3 { top: 20%; right: 10%; font-size: 2.2rem; animation-delay: -3s; }
.ornament.orn-4 { top: 80%; right: 15%; font-size: 2rem; animation-delay: -1s; }

@keyframes floatOrn {
    0% { transform: translateY(0) rotate(0deg) scale(1); }
    100% { transform: translateY(-20px) rotate(15deg) scale(1.1); }
}

/* 3D Floating Particles */
.particle-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
}

.gold-particle {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, #fff7ad, #d4af37 60%, #b8860b);
    border-radius: 50%;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.4));
    animation: goldFloat 8s infinite ease-in-out;
}

@keyframes goldFloat {
    0% { transform: translate(0, 110vh) rotate(0deg) scale(0); opacity: 0; }
    20% { opacity: 0.8; scale: 1; }
    80% { opacity: 0.6; scale: 0.8; }
    100% { transform: translate(100px, -10vh) rotate(360deg) scale(0); opacity: 0; }
}

/* Input Group Styles */
.input-group {
    width: 100%;
    max-width: 320px;
    margin-bottom: -1rem; /* bring it closer to the button */
    position: relative;
    z-index: 10;
}

.input-group input {
    width: 100%;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    border: 2px solid var(--gold-rich);
    background: rgba(0, 0, 0, 0.7);
    color: var(--gold-bright);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    outline: none;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--gold-bright);
    box-shadow: 0 0 15px var(--gold-shadow);
}

.input-group input::placeholder {
    color: var(--gold-rich);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.error-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: #ff4d4d !important; 
    color: #ff4d4d !important;
    background: rgba(138, 14, 26, 0.4) !important;
}
.error-shake::placeholder {
    color: var(--accent) !important;
    opacity: 1 !important;
}

@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* History Button */
.amenity-btn {
    background: rgba(18, 1, 2, 0.8);
    color: var(--gold-bright);
    border: 1px solid var(--gold-rich);
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
.amenity-btn:hover {
    background: var(--gold-light);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    border-color: var(--gold-light);
}

/* History Modal Specific */
.history-content {
    padding: 2rem 1.5rem;
    max-width: 450px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 1rem;
}
.close-btn {
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 0.8;
}
.close-btn:hover { color: var(--accent); }

.history-list-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}
.history-list-container::-webkit-scrollbar { width: 6px; }
.history-list-container::-webkit-scrollbar-thumb { background: var(--gold-main); border-radius: 10px; }
.history-list-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.05); }

.history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.history-table th {
    padding: 0.5rem;
    color: var(--gold-bright);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    border-bottom: 2px solid var(--gold-rich);
}
.history-table td {
    padding: 0.8rem 0.5rem;
    color: var(--text-gold);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    font-weight: 600;
}
.history-table tr:last-child td { border-bottom: none; }
.history-prize { color: var(--gold-bright) !important; text-align: right; }

/* Animation for new row */
@keyframes slideDownHistory {
    from { opacity: 0; transform: translateY(-10px); background: rgba(212, 175, 55, 0.2); }
    to { opacity: 1; transform: translateY(0); background: transparent; }
}
.new-row {
    animation: slideDownHistory 0.5s ease-out forwards;
}

/* ========================================================= */
/* MOBILE RESPONSIVE OPTIMIZATIONS (Sultan Grade)            */
/* ========================================================= */
@media screen and (max-width: 480px) {
    .app-container {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    header h1 {
        font-size: 2.3rem;
        letter-spacing: -0.5px;
    }
    
    header p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    /* Scale down the entire wheel complex effortlessly */
    .wheel-section {
        gap: 2.5rem;
        transform: scale(0.9);
        margin-top: -0.5rem;
        margin-bottom: -1rem;
    }
    
    #spin-code {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
    
    .spin-btn {
        padding: 1.1rem 2.5rem;
        font-size: 1.1rem;
    }
    
    /* Modals Content Fits Mobile */
    .modal-content {
        padding: 2rem 1.2rem;
    }
    
    #welcome-modal .modal-content h2 {
        font-size: 1.6rem !important;
    }
    
    #reward-modal h2 {
        font-size: 1.8rem;
    }
    
    #reward-text strong {
        font-size: 1.3rem;
    }
    
    .history-toggle-btn {
        font-size: 0.95rem;
        padding: 0.7rem 1.5rem;
    }
}

/* Extra small screens (e.g., iPhone SE, Galaxy Fold external) */
@media screen and (max-width: 360px) {
    header h1 {
        font-size: 1.9rem;
    }
    .wheel-section {
        transform: scale(0.78);
        margin-top: -1.5rem;
        margin-bottom: -2rem;
    }
    .modal-content {
        padding: 1.5rem 1rem;
    }
    #welcome-modal .modal-content h2 {
        font-size: 1.4rem !important;
    }
}

/* --- FITUR TERBARU: MARQUEE & FLOATING TOOLS --- */
.promo-marquee-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #b8860b, #ffd700, #b8860b);
    color: #1a202c;
    padding: 8px 15px;
    font-weight: 800;
    font-size: 0.95rem;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(214, 158, 46, 0.4);
}

.promo-marquee-container.hidden {
    display: none;
}

.floating-tools {
    position: fixed;
    top: 50px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.float-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--gold-bright);
    padding: 8px 16px;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.float-btn:hover {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-color: #ffd700;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(214, 158, 46, 0.4);
}

/* Wall of Fame List Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.lb-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--gold-rich);
    color: var(--text-gold);
}

.lb-item.Sultan {
    background: linear-gradient(90deg, rgba(94, 11, 19, 0.4), transparent);
    border-left: 4px solid var(--accent, #e53e3e);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.lb-item.Gold {
    border-left: 4px solid #d69e2e;
}

/* TOAST NOTIFICATION LUXURY */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: -300px; /* Initially hidden */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-container.show {
    right: 30px;
}

.toast-box {
    background: linear-gradient(135deg, var(--bg-royale-vivid), var(--bg-royale-dark));
    backdrop-filter: blur(10px);
    border: 1px solid var(--gold-rich);
    border-left: 5px solid var(--gold-bright);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    animation: toastPop 0.4s ease-out;
}

.toast-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px var(--gold-light));
}

.toast-msg {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gold);
}

.toast-msg strong {
    color: var(--gold-bright);
}

@keyframes toastPop {
    from { transform: translateX(50px) scale(0.8); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

.lb-rank {
    width: 25px;
    font-weight: 800;
    color: var(--gold-bright);
}

.lb-user span {
    display: block;
}

.lb-mode {
    font-size: 0.75rem; 
    color: var(--text-gold);
}

.lb-sultan-text {
    font-size: 0.75rem; 
    color: #e53e3e; 
    font-weight: 800;
}

.lb-score {
    font-weight: 800;
    color: var(--gold-bright);
}

/* --- NEW WHEEL LOADER --- */
.cinematic-loader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

.cinematic-loader.door-open {
    transform: scale(1.5);
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 300px;
}

.loader-wheel-outer {
    position: relative;
    width: 120px;
    height: 120px;
    border: 5px solid #222;
    border-radius: 50%;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.loader-wheel {
    width: 100%;
    height: 100%;
    position: relative;
    animation: rotateInfinite 2s linear infinite;
}

.wheel-seg {
    position: absolute;
    width: 100%; height: 100%;
    border: 1px solid rgba(255,215,0,0.1);
}

.wheel-seg:nth-child(1) { border-top: 15px solid #d4af37; }
.wheel-seg:nth-child(2) { border-right: 15px solid #b8860b; }
.wheel-seg:nth-child(3) { border-bottom: 15px solid #ffdf70; }
.wheel-seg:nth-child(4) { border-left: 15px solid #d4af37; }

.loader-center {
    position: absolute;
    width: 40px; height: 40px;
    background: radial-gradient(circle at 30% 30%, #fff7ad, #d4af37);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    z-index: 5;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 2px;
}

.logo-text span { color: #fcf6ba; }

.progress-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #222;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.progress-fill {
    width: 0%; /* Dynamic */
    height: 100%;
    background: linear-gradient(90deg, #b8860b, #ffd700, #b8860b);
    box-shadow: 0 0 10px #b8860b;
    transition: width 0.1s linear;
}

#loader-text {
    color: #a0aec0;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

#progress-percent {
    color: #ffd700;
    font-weight: 800;
}

@keyframes rotateInfinite {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- PARALLAX COINS (PURE CSS) --- */
.parallax-coin {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Realistic Gold Coin Shader */
    background: radial-gradient(ellipse at 30% 30%, #fff 0%, #ffd700 20%, #b8860b 60%, #5a4000 100%);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.8), 2px 5px 15px rgba(0,0,0,0.4);
    border: 3px solid #ffdf00;
    z-index: -1; /* Behind wheel */
    opacity: 0.6;
    animation: float-coin linear infinite;
}

/* Depth of Field Blur for realism */
.coin-1 { width: 100px; height: 100px; top: 10%; left: 5%; filter: blur(4px); animation-duration: 25s; }
.coin-2 { width: 40px; height: 40px; top: 60%; left: 15%; filter: blur(1px); animation-duration: 15s; animation-direction: reverse; }
.coin-3 { width: 80px; height: 80px; top: 20%; right: 5%; filter: blur(3px); animation-duration: 22s; }
.coin-4 { width: 50px; height: 50px; top: 70%; right: 10%; filter: blur(1.5px); animation-duration: 18s; animation-direction: reverse; }
.coin-5 { width: 30px; height: 30px; top: 40%; left: 50%; filter: blur(5px); animation-duration: 30s; }

@keyframes float-coin {
    0% { transform: translateY(0px) rotate(0deg) scale(1); }
    33% { transform: translateY(-30px) rotate(120deg) scale(1.05); }
    66% { transform: translateY(20px) rotate(240deg) scale(0.95); }
    100% { transform: translateY(0px) rotate(360deg) scale(1); }
}
