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

:root {
    --bg-color: #f0f2f5;
    --container-bg-color: white;
    --text-color: #333;
    --button-bg-color: #4CAF50;
    --button-hover-bg-color: #45a049;
    --button-shadow-color: rgba(76, 175, 80, 0.4);
    --number-color-1: #f3b404;
    --number-color-2: #00aed9;
    --number-color-3: #e54040;
    --number-color-4: #8c8c8c;
    --number-color-5: #4caf50;
}

body.dark-mode {
    --bg-color: #121212;
    --container-bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --button-bg-color: #66bb6a;
    --button-hover-bg-color: #81c784;
    --button-shadow-color: rgba(102, 187, 106, 0.4);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    text-align: center;
    background-color: var(--container-bg-color);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

h1 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.probability-explanation {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#generateBtn {
    background-color: var(--button-bg-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--button-shadow-color);
}

#generateBtn:hover {
    background-color: var(--button-hover-bg-color);
    transform: translateY(-2px);
}

#generateBtn:active {
    transform: translateY(0);
}

.lotto-sets-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lotto-set {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.lotto-number-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Horizontally centers circle and probability text */
    /* Removed min-height and justify-content */
    text-align: center;
}

.lotto-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pop-in 0.5s ease-out;
    margin-bottom: 5px; /* Consistent spacing below the circle */
}

.probability {
    font-size: 12px;
    color: var(--text-color);
    /* margin-top removed, replaced by margin-bottom on .lotto-number */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow if text is too long */
    text-overflow: ellipsis; /* Add ellipsis for hidden overflow */
}

.probability {
    font-size: 12px;
    color: var(--text-color);
    margin-top: 5px;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow if text is too long */
    text-overflow: ellipsis; /* Add ellipsis for hidden overflow */
}

.lotto-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pop-in 0.5s ease-out;
}

.probability {
    font-size: 12px;
    color: var(--text-color);
    margin-top: 5px;
}

.theme-switcher-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-label {
    font-size: 16px;
    color: var(--text-color);
    margin: 0; /* Ensure no default margin interferes */
}

.theme-switcher {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.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;
    transition: .4s;
    border-radius: 34px;
}

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

input:checked + .slider {
    background-color: #2196F3;
}

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

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