:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #222222;
    --muted-text: #5c6675;
    --button-bg: #4caf50;
    --button-hover: #45a049;
    --toggle-bg: #2f3b52;
    --toggle-hover: #223047;
}

body[data-theme='dark'] {
    --bg-color: #10131a;
    --card-bg: #1a1f2b;
    --text-color: #f4f6fb;
    --muted-text: #c2c8d6;
    --button-bg: #57b86a;
    --button-hover: #4da55f;
    --toggle-bg: #f4f6fb;
    --toggle-hover: #dce2f1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: min(880px, 100%);
}

h1 {
    margin-top: 0;
    color: var(--text-color);
}

.love-message {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#generate-btn,
#theme-btn {
    color: white;
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#generate-btn {
    background-color: var(--button-bg);
}

#generate-btn:hover {
    background-color: var(--button-hover);
}

#theme-btn {
    background-color: var(--toggle-bg);
    color: #ffffff;
}

body[data-theme='dark'] #theme-btn {
    color: #12151d;
}

#theme-btn:hover {
    background-color: var(--toggle-hover);
}

.lotto-numbers-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 2rem;
}

.lotto-set-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.set-label {
    width: 70px;
    text-align: right;
    margin-right: 0.4rem;
    font-weight: 700;
    color: var(--muted-text);
}

.lotto-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
}

.lotto-set-row .lotto-number:nth-child(2) { background-color: #f44336; }
.lotto-set-row .lotto-number:nth-child(3) { background-color: #e91e63; }
.lotto-set-row .lotto-number:nth-child(4) { background-color: #9c27b0; }
.lotto-set-row .lotto-number:nth-child(5) { background-color: #673ab7; }
.lotto-set-row .lotto-number:nth-child(6) { background-color: #3f51b5; }
.lotto-set-row .lotto-number:nth-child(7) { background-color: #2196f3; }

@media (max-width: 640px) {
    .container {
        padding: 1.2rem;
    }

    .set-label {
        width: auto;
        text-align: center;
        margin-right: 0;
        flex-basis: 100%;
    }
}
