/* Theme variables --------------------------------------------------------- */
:root {
    --primary: #00d4ff;
    --secondary: #ff007a;
    --bg: #0a0a0c;
    --card: rgba(255, 255, 255, 0.05);
    --gold: #ffd700;
}

/* Page layout ------------------------------------------------------------- */
body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0c 100%);
}

.container {
    text-align: center;
    padding: 40px;
    background: var(--card);
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 500px;
    width: 90%;
}

.container.wide {
    max-width: 900px;
}

h1 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 30px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.side-toggle {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.fun-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.fun-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.fun-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fun-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.2);
    border-radius: 34px;
    transition: 0.3s;
}

.fun-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.fun-switch input:checked + .slider {
    background-color: var(--primary);
}

.fun-switch input:checked + .slider:before {
    transform: translateX(24px);
}

.fun-label {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
}

.btn-side {
    padding: 10px 20px;
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    border-radius: 10px;
    transition: 0.3s;
    font-weight: bold;
    text-transform: uppercase;
}

.btn-side.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    background: rgba(0, 212, 255, 0.2);
}

.volume-control {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    padding: 14px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 100;
    gap: 10px;
    cursor: pointer;
}

.volume-control:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
}

.volume-icon {
    font-size: 1.4rem;
    user-select: none;
}

.volume-bars {
    display: flex;
    gap: 5px;
    align-items: flex-end;
}

.volume-bars .bar {
    width: 6px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.3;
}

.volume-bars.level-1 .bar:nth-child(1),
.volume-bars.level-2 .bar:nth-child(-n+2),
.volume-bars.level-3 .bar {
    opacity: 1;
    background: var(--primary);
}

.volume-bars.level-1 .bar:nth-child(1) {
    height: 14px;
}

.volume-bars.level-2 .bar:nth-child(-n+2) {
    height: 18px;
}

.volume-bars.level-3 .bar {
    height: 22px;
}

.slots-machine {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    perspective: 1000px;
}

.slot {
    flex: 1;
    background: #111;
    border: 3px solid #333;
    border-radius: 15px;
    padding: 20px 10px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px #000;
    transition: border-color 0.3s;
}

.slot.spinning {
    border-color: var(--primary);
    animation: slotShake 0.1s infinite;
}

.slot-window {
    position: relative;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.reel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    transition: transform 0.2s ease;
}

.reel.spinning {
    animation: reelSpin 0.45s linear infinite;
}

.reel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    gap: 6px;
    opacity: 0.45;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.reel-item:nth-child(2) {
    opacity: 1;
}

.reel-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.25));
}

.reel-name {
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    min-height: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flag-text {
    background-size: contain;
    background-position: center;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.8));
}

@keyframes reelSpin {
    0% { transform: translateY(0); }
    100% { transform: translateY(-72px); }
}

.roll-button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 15px 40px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(255, 0, 122, 0.4);
}

.roll-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 0, 122, 0.6);
}

.roll-button:active {
    transform: scale(0.95);
}

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

@keyframes reelBounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

@keyframes slotShake {
    0% { transform: translateY(1px); }
    50% { transform: translateY(-1px); }
    100% { transform: translateY(1px); }
}

.fun-ad-overlay {
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10000;
}

.fun-ad-overlay.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fun-ad-popup {
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
}

.fun-ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10001;
}

.fun-ad-image-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fun-ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fun-ad-popup::before {
    content: 'Sponsored';
    position: absolute;
    left: 16px;
    top: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 10001;
}
