/* Theme variables */
:root {
    color-scheme: dark;
    --bg-color: #1a1a1a;
    --bg-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23333333' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    --text-color: #f0f0f0;
    --title-color: #ffffff;
    --subtitle-color: #cccccc;
    --container-bg: rgba(40, 40, 40, 0.8);
    --container-border: rgba(255, 255, 255, 0.1);
    --container-shadow: 0 15px 30px rgba(0,0,0,0.5);
    --title-shadow: 0 0 15px rgba(255,255,255,0.3);
    --toggle-bg: rgba(255, 255, 255, 0.08);
    --toggle-border: rgba(255, 255, 255, 0.2);
    --toggle-icon: #f7d26a;
    --toggle-cutout: #1a1a1a;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg-color: #f4f2ee;
    --bg-pattern: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d6cfc7' fill-opacity='0.35'%3E%3Cpath d='M40 10l7 12 14 2-10 9 2 14-13-7-13 7 2-14-10-9 14-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    --text-color: #2b2b2b;
    --title-color: #1f1f1f;
    --subtitle-color: #4a4a4a;
    --container-bg: rgba(255, 255, 255, 0.8);
    --container-border: rgba(0, 0, 0, 0.08);
    --container-shadow: 0 15px 30px rgba(0,0,0,0.15);
    --title-shadow: 0 0 12px rgba(0,0,0,0.12);
    --toggle-bg: rgba(0, 0, 0, 0.06);
    --toggle-border: rgba(0, 0, 0, 0.15);
    --toggle-icon: #ff9f1c;
    --toggle-cutout: #f4f2ee;
}

/* General Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: var(--bg-pattern);
    color: var(--text-color);
    margin: 0;
}

/* Main Container */
.container {
    background-color: var(--container-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--container-shadow);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid var(--container-border);
    position: relative;
}

h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--title-color);
    text-shadow: var(--title-shadow);
}

.subtitle {
    font-size: 1.1em;
    color: var(--subtitle-color);
    margin-top: 5px;
    margin-bottom: 30px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
}

.theme-toggle-button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

.theme-toggle-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.theme-toggle-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--toggle-icon);
    box-shadow: 0 0 10px rgba(255, 210, 106, 0.7);
    position: relative;
}

:root[data-theme="light"] .theme-toggle-icon {
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.6);
}

.theme-toggle-icon::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 2px solid var(--toggle-icon);
    border-radius: 50%;
    opacity: 0.7;
}

.theme-toggle-icon::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--toggle-cutout);
    opacity: 0;
    transition: opacity 0.2s ease;
}

:root[data-theme="dark"] .theme-toggle-icon {
    background: #cfd6ff;
    box-shadow: 0 0 12px rgba(207, 214, 255, 0.7);
}

:root[data-theme="dark"] .theme-toggle-icon::before {
    border-color: #8f9bff;
}

:root[data-theme="dark"] .theme-toggle-icon::after {
    opacity: 1;
}

/* Lotto Numbers Container */
.menu-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin: 40px 0;
}

.menu-card {
    border-radius: 18px;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 18px rgba(0,0,0,0.2);
    text-align: left;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: cardFloat 0.6s ease forwards;
}

:root[data-theme="light"] .menu-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.35));
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 18px rgba(0,0,0,0.08);
}

.menu-name {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--title-color);
}

.menu-tagline {
    font-size: 0.95em;
    color: var(--subtitle-color);
    margin: 0;
}

.menu-type {
    margin-top: 12px;
    font-size: 0.85em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtitle-color);
}

/* Generate Button */
#generate-btn {
    position: relative;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(45deg, #FF416C, #FF4B2B);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    outline: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(255, 75, 43, 0.4);
}

#generate-btn .button-text {
    position: relative;
    z-index: 1;
}

.button-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 75, 43, 0.6);
}

#generate-btn:hover .button-glow {
    opacity: 1;
}

#generate-btn:active {
    transform: translateY(1px);
}

@keyframes cardFloat {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 700px) {
    .container {
        width: min(92vw, 520px);
        padding: 32px 24px;
    }

    .menu-cards {
        grid-template-columns: 1fr;
    }
}
