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

/* ── Theme variables ── */
:root {
    --transition: 0.3s ease;
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-radial-1: rgba(121, 68, 154, 0.8);
    --bg-radial-2: rgba(102, 126, 234, 0.8);
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.18);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --placeholder-bg: rgba(255, 255, 255, 0.2);
    --toggle-bg: rgba(255, 255, 255, 0.15);
    --toggle-hover: rgba(255, 255, 255, 0.25);
    --toggle-border: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #f0f4ff 0%, #e8eaf6 100%);
    --bg-radial-1: rgba(200, 180, 255, 0.5);
    --bg-radial-2: rgba(150, 180, 255, 0.4);
    --text-color: #2d2d4e;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(100, 100, 200, 0.15);
    --card-shadow: 0 8px 32px 0 rgba(100, 100, 200, 0.2);
    --placeholder-bg: rgba(100, 100, 200, 0.15);
    --toggle-bg: rgba(100, 100, 200, 0.1);
    --toggle-hover: rgba(100, 100, 200, 0.2);
    --toggle-border: rgba(100, 100, 200, 0.25);
}

/* ── Base ── */
*, *::before, *::after {
    transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: var(--bg-gradient);
    background-image:
        radial-gradient(circle at top right, var(--bg-radial-1), transparent),
        radial-gradient(circle at bottom left, var(--bg-radial-2), transparent);
    color: var(--text-color);
}

/* ── Theme toggle button ── */
#theme-toggle {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 100;
    padding: 0;
    transition: background var(--transition), transform 0.2s ease, box-shadow var(--transition);
}

#theme-toggle:hover {
    background: var(--toggle-hover);
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#theme-toggle:active {
    transform: scale(0.95);
}

/* ── Layout ── */
.container {
    width: 90%;
    max-width: 500px;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.lotto-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
}

.lotto-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* ── Lotto balls ── */
.lotto-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 2rem 0;
}

.number-placeholder, .number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.number-placeholder {
    background: var(--placeholder-bg);
}

.number {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* ── Generate button ── */
#generate-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

#generate-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}
