:root {
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --button-bg: #4CAF50;
    --button-hover: #45a049;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --button-bg: #66bb6a;
    --button-hover: #4caf50;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    padding: 20px 0;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px;
    cursor: pointer;
    background: var(--container-bg);
    border: 2px solid var(--button-bg);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: all 0.3s;
    z-index: 1000;
}

/* Lotto Generator Container */
lotto-generator {
    background-color: var(--container-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: background-color 0.3s, box-shadow 0.3s;
    text-align: center;
    display: block;
    min-width: 320px;
}

/* Lotto Set Row */
.set {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Lotto Ball Common Style */
.number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    margin: 0 6px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    color: #ffffff !important; /* Always white text for visibility */
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.2);
    transition: transform 0.2s;
}

.number:hover {
    transform: scale(1.1);
}

/* Lotto Ball Colors based on Range */
.yellow { background-color: #fbc400 !important; }
.blue   { background-color: #69c8f2 !important; }
.red    { background-color: #ff7272 !important; }
.gray   { background-color: #aaaaaa !important; }
.green  { background-color: #b0d840 !important; }

/* Bonus Number Styling */
.plus {
    font-size: 22px;
    font-weight: bold;
    margin: 0 12px;
    color: var(--text-color);
}

.bonus-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 5px;
}

.bonus-label {
    font-size: 10px;
    position: absolute;
    top: -18px;
    font-weight: bold;
    color: #ff7272; /* Highlight bonus label */
    letter-spacing: 0.5px;
}

/* Generate Button */
button.generate-btn {
    padding: 14px 28px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    background-color: var(--button-bg);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

button.generate-btn:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

button.generate-btn:active {
    transform: scale(0.95);
}
