@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --font-family: 'Poppins', sans-serif;

    /* Light Theme */
    --bg-color-light: #f0f2f5;
    --surface-color-light: #ffffff;
    --text-color-light: #1c1c1e;
    --accent-color-light: #007aff;
    --shadow-color-light: rgba(0, 0, 0, 0.1);
    --glow-color-light: rgba(0, 122, 255, 0.5);

    /* Dark Theme */
    --bg-color-dark: #1c1c1e;
    --surface-color-dark: #2c2c2e;
    --text-color-dark: #f2f2f7;
    --accent-color-dark: #0a84ff;
    --shadow-color-dark: rgba(0, 0, 0, 0.4);
    --glow-color-dark: rgba(10, 132, 255, 0.6);

    /* Default to Light Theme */
    --bg-color: var(--bg-color-light);
    --surface-color: var(--surface-color-light);
    --text-color: var(--text-color-light);
    --accent-color: var(--accent-color-light);
    --shadow-color: var(--shadow-color-light);
    --glow-color: var(--glow-color-light);
}

html[data-theme='dark'] {
    --bg-color: var(--bg-color-dark);
    --surface-color: var(--surface-color-dark);
    --text-color: var(--text-color-dark);
    --accent-color: var(--accent-color-dark);
    --shadow-color: var(--shadow-color-dark);
    --glow-color: var(--glow-color-dark);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><filter id="n" x="0" y="0"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: -1;
}

.app-container {
    width: 100%;
    max-width: 420px;
    margin: 20px;
    padding: 30px;
    background-color: var(--surface-color);
    border-radius: 24px;
    box-shadow: 0 10px 30px var(--shadow-color);
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.theme-switcher {
    position: relative;
    width: 50px;
    height: 28px;
}

.theme-switcher input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 34px;
    transition: 0.4s;
}

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

input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.app-main {
    margin-bottom: 30px;
}

.lotto-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    min-height: 80px;
    align-items: center;
}

.placeholder {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.7;
}

.lotto-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: pop-in 0.5s ease-out forwards;
}

/* Color gradients for numbers */
.color-1 { background: linear-gradient(135deg, #f9d423, #ff4e50); }
.color-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.color-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.color-4 { background: linear-gradient(135deg, #ff8c42, #ff3f7e); }
.color-5 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.color-6 { background: linear-gradient(135deg, #84fab0, #8fd3f4); }

@keyframes pop-in {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.action-button {
    width: 100%;
    padding: 15px;
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--accent-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px var(--glow-color);
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-color);
}

.action-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px var(--glow-color);
}
