
:root {
    --primary-bg: #f4f7f6;
    --text-color: #333;
    --container-bg: #ffffff;
    --number-bg: #e9ecef;
    --number-selected-bg: #007bff;
    --number-selected-color: #ffffff;
    --button-bg: #007bff;
    --button-hover-bg: #0056b3;
    --button-text-color: #ffffff;
    --set-bg: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: var(--container-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

h1, h2, h3 {
    text-align: center;
    color: var(--text-color);
}

h1 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
}

h2 {
    font-size: 1.4em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Number Selection Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.number {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    background-color: var(--number-bg);
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

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

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

/* Current Selection Display */
.current-selection {
    margin-top: 20px;
}

.selected-numbers-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 10px;
    background-color: var(--primary-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.selected-number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35px;
    height: 35px;
    margin: 4px;
    background-color: var(--number-selected-bg);
    color: var(--number-selected-color);
    border-radius: 50%;
    font-weight: bold;
}


/* Controls */
.controls {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    gap: 10px;
}

.controls button {
    flex-grow: 1;
    padding: 12px 15px;
    font-size: 1em;
    font-weight: bold;
    color: var(--button-text-color);
    background-color: var(--button-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-align: center;
}

.controls button:hover {
    background-color: var(--button-hover-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#reset-btn {
    background-color: #dc3545;
}
#reset-btn:hover {
    background-color: #c82333;
}

/* Sets Panel */
.sets-panel {
    margin-top: 30px;
}

#sets-list p {
    text-align: center;
    color: #6c757d;
}

.lotto-set {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: var(--set-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.lotto-set strong {
    margin-right: 10px;
}

.lotto-number-in-set {
    margin: 0 4px;
    font-weight: bold;
    color: var(--number-selected-bg);
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .controls {
        flex-direction: column;
    }
}
