:root {
    --primary-color: #311b92;
        /* Deep Indigo */
        --secondary-color: #d4af37;
        /* Metallic Gold */
        --accent-color: #7c4dff;
        /* Glowing Purple */
        --background-dark: #050010;
        /* Almost Black */
    --text-light: #e0e0e0;
    --glass-bg: rgba(0, 0, 0, 0.6);
    --glow: 0 0 15px rgba(124, 77, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cinzel', serif;
    background-color: var(--background-dark);
    background-size: 300px;
        /* Adjust scale of texture */
    background-repeat: repeat;
    background-blend-mode: multiply;
        /* Blend with dark color */
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 60px;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3.5rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #aaa;
    letter-spacing: 1px;
}

/* Last Results Section */
#last-results {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#last-results h2 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.results-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.result-group h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 10px;
}

.mini-balls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.mini-balls span {
    width: 35px;
    height: 35px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    color: #050010;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.mini-balls .mini-super {
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    border: 1px solid #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.disclaimer-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #888;
    margin-top: 10px;
}

.disclaimer-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.disclaimer-text a:hover {
    text-decoration: underline;
}
.genie-container img {
    max-width: 800px;
        /* Bigger image */
    width: 100%;
    height: auto;
    filter: contrast(1.2) brightness(1.1);
    mix-blend-mode: screen;
}

@keyframes pulse-glow {
    0% {
            filter: drop-shadow(0 0 10px rgba(124, 77, 255, 0.2)) contrast(1.2);
        }
    
        50% {
            filter: drop-shadow(0 0 30px rgba(124, 77, 255, 0.6)) contrast(1.2);
        }
    
        100% {
            filter: drop-shadow(0 0 10px rgba(124, 77, 255, 0.2)) contrast(1.2);
        }
    }
    
    /* Mechanics Section */
    #mechanics {
        margin: 50px 0;
        padding: 20px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
    }
    
    #mechanics h2 {
        font-size: 1.8rem;
        color: var(--accent-color);
        margin-bottom: 20px;
    }
    
    .mechanics-content {
        display: flex;
        justify-content: center;
        gap: 40px;
        flex-wrap: wrap;
    }
    
    .mechanic-item {
        display: flex;
        align-items: center;
        gap: 15px;
        font-family: 'Outfit', sans-serif;
        font-size: 1.1rem;
        color: #ddd;
    }
    
    .mechanic-item .icon {
        font-size: 2rem;
}

.game-info {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Outfit', sans-serif;
    color: #ccc;
    margin: 20px 0
}

/* Crystal Ball Styling */
.result-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ball {
    width: 85px;
        height: 85px;
        background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.2));
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 2.2rem;
        box-shadow:
        inset 0 0 15px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(124, 77, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
    font-family: 'Cinzel', serif;
}

.ball:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 0 30px rgba(124, 77, 255, 0.8);
}

.placeholder-ball {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
        /* box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); */
        box-shadow: 0 0 15px var(--accent-color);
        transition: box-shadow 0.3s ease;
    }
    
    .placeholder-ball:hover {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.super-ball {
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    color: #050010;
    border: 1px solid #fff;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    text-shadow: none;
}

/* Magic Button */
.magic-btn {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    border-radius: 1rem;
        padding: 22px 50px;
        font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin: 10px 0;
}

.magic-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

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

.magic-btn:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    text-shadow: 0 0 10px var(--secondary-color);
    background: rgba(212, 175, 55, 0.1);
}

.magic-btn:disabled {
    border-color: #555;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
}

/* Ad Banner */
.ad-banner {
    background-color: rgba(0, 0, 0, 0.5);
    color: #444;
    border: 1px solid #222;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Ad Unlock Container */
#ad-unlock-container {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(27, 94, 32, 0.15));
    border: 2px solid #4caf50;
    border-radius: 15px;
    padding: 30px 20px;
    margin: 20px 0;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.3), inset 0 0 20px rgba(76, 175, 80, 0.1);
    animation: pulse-unlock 2s ease-in-out infinite;
}

#ad-unlock-container p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: #4caf50;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

@keyframes pulse-unlock {
    0%, 100% {
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.3), inset 0 0 20px rgba(76, 175, 80, 0.1);
        border-color: #4caf50;
    }
    50% {
        box-shadow: 0 0 50px rgba(76, 175, 80, 0.6), inset 0 0 30px rgba(76, 175, 80, 0.2);
        border-color: #66bb6a;
    }
}

.ad-btn {
    background: linear-gradient(to right, #1b5e20, #2e7d32);
    border: 2px solid #4caf50;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.ad-btn:hover {
    background: linear-gradient(to right, #2e7d32, #43a047);
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Accessibility Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-y: auto;
}

.modal-content {
    background: #0a0a0a;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.2);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
}

.modal-content h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.modal-content p {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #ccc;
    margin-top: 20px;
}

.loader {
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Lighting Overlay */
.lighting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
        /* Allow clicks to pass through */
        background: radial-gradient(circle at 50% 20%,
                rgba(124, 77, 255, 0.15) 0%,
            rgba(0, 0, 0, 0) 60%),
                radial-gradient(circle at 50% 50%,
                    rgba(255, 215, 0, 0.05) 0%,
            rgba(0, 0, 0, 0.4) 100%);
                z-index: 0;
                /* Behind app-container (which is z-index: 1) */
    mix-blend-mode: overlay;
}

/* Footer */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.warning {
    color: #d32f2f;
    font-size: 0.85rem;
    background: rgba(211, 47, 47, 0.1);
    padding: 10px;
    border-radius: 5px;
    border: 1px solid rgba(211, 47, 47, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        margin: 10px;
    }

    .modal-content h2 {
        font-size: 1.4rem;
    }

    .modal-content p {
        font-size: 1rem;
    }

    #ad-unlock-container {
        padding: 20px 15px;
    }

    #ad-unlock-container p {
        font-size: 1rem;
    }

    .ad-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}