
:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --container-bg: #1e1e1e;
    --button-bg: #6200ea;
    --button-text: #ffffff;
    --number-bg: #333;
}

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

body.light-mode {
    --bg-color: #f0f0f0;
    --text-color: #333333;
    --container-bg: #ffffff;
    --button-bg: #6200ea;
    --button-text: #ffffff;
    --number-bg: #e0e0e0;
}

.container {
    text-align: center;
    padding: 2rem;
    background-color: var(--container-bg);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.23);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#generate {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(98, 0, 234, 0.3);
}

#generate:hover {
    background-color: #7f39fb;
    box-shadow: 0 6px 8px rgba(98, 0, 234, 0.4);
}

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

.numbers-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--number-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-in-out;
}

.info-header {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 5;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

body.light-mode .info-header {
    background: rgba(255, 255, 255, 0.5);
    color: #333;
}

.theme-switch-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

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

.theme-switch 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;
}

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

input:checked + .slider {
    background-color: #6200ea;
}

input:focus + .slider {
    box-shadow: 0 0 1px #6200ea;
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}


.numbers-row.favorite .number {
    background-color: #ffd700;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
}

/* Tooltip container */
.numbers-row.favorite {
    position: relative;
    cursor: help;
}

/* Tooltip text */
.numbers-row.favorite::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.numbers-row.favorite:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Tooltip arrow */
.numbers-row.favorite::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 10;
}

.numbers-row.favorite:hover::before {
    opacity: 1;
    visibility: visible;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
