:root {
    --bg-color: #05070d;
    --card-bg: #0a0f1a;
    --neon-blue: #3da0ff;
    --neon-glow: rgba(61, 160, 255, 0.5);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --gradient-btn: linear-gradient(135deg, #3da0ff 0%, #0056b3 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(61, 160, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(61, 160, 255, 0.05) 0%, transparent 20%);
}

.app-container {
    width: 100%;
    max-width: 1400px;
    /* Wider for 3 cards */
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* Header & Title */
.app-logo {
    width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    filter: drop-shadow(0 0 15px rgba(61, 160, 255, 0.4));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--neon-glow);
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.glow-text {
    color: var(--text-main);
}

/* Cards Layout */
.cards-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    flex-wrap: wrap;
}

/* Glass Card Base */
.glass-card {
    background: rgba(10, 15, 26, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(61, 160, 255, 0.2);
    border-radius: 20px;
    padding: 30px 20px;
    width: 100%;
    max-width: 350px;
    /* Default width for side cards */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(61, 160, 255, 0.1);
    border-color: rgba(61, 160, 255, 0.4);
    transform: translateY(-5px);
}

/* Side Cards Specifics */
.side-card {
    margin-top: 20px;
    /* Align slightly lower than main card */
}

.card-header h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Card (Mega Sena) - GOLD THEME */
.main-card {
    max-width: 400px;
    transform: scale(1.05);
    z-index: 10;
    border-color: rgba(255, 215, 0, 0.3);
    /* Gold border */
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.main-card:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    transform: scale(1.05) translateY(-5px);
}

.gold-theme .card-header h3 {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    font-size: 1.8rem;
}

.gold-theme .input-group label {
    color: #FFD700;
}

.gold-theme .input-group input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* Inputs */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--neon-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    background: rgba(5, 7, 13, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
}

.input-group input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(61, 160, 255, 0.2);
}

/* Buttons */
.neon-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.btn-blue {
    background: var(--gradient-btn);
}

.btn-gold {
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%);
    color: #000;
    /* Contrast for gold */
}

.btn-blue:hover {
    box-shadow: 0 0 20px var(--neon-glow);
}

.btn-gold:hover {
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 26, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(5px);
    border-radius: 20px;
}

.loading-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--neon-blue);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.gold-theme .loading-text {
    color: #FFD700;
}

.loading-details {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
    font-family: 'Courier New', monospace;
}

/* Scanner Animation */
.scanner-line {
    width: 80%;
    height: 2px;
    background: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    animation: scan 1.5s infinite alternate;
}

@keyframes scan {
    0% {
        transform: scaleX(0.1);
        opacity: 0.5;
    }

    100% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Radar Animation for Main Card */
.radar-scan {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Result Area */
.result-area {
    margin-top: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.result-area h4 {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 400;
    font-size: 1rem;
}

.numbers-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ball {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #3da0ff, #0a0f1a);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 0 10px var(--neon-glow);
    border: 1px solid rgba(61, 160, 255, 0.5);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: scale(0.5);
}

.gold-theme .ball {
    background: radial-gradient(circle at 30% 30%, #FFD700, #3a2a00);
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    color: #000;
}

.small-balls .ball {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .cards-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        /* More space between stacked cards */
    }

    .glass-card {
        width: 90%;
        /* Consistent width */
        max-width: 400px;
    }

    .main-card {
        order: 0;
        /* Keep original order: LotoFacil, Mega, LotoMania */
        transform: scale(1.05);
        /* Keep the highlight effect even on mobile */
        margin: 10px 0;
    }

    .side-card {
        margin-top: 0;
    }

    .main-card:hover {
        transform: scale(1.05) translateY(-5px);
    }
}