@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --background-gradient: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    --text-color: #333;
    --container-bg: rgba(255, 255, 255, 0.1);
    --button-bg: #ff6b6b;
    --button-text-color: #fff;
    --result-bg: rgba(255, 255, 255, 0.2);
    --result-text-color: #333;
}

[data-theme="dark"] {
    --background-gradient: linear-gradient(120deg, #2c3e50 0%, #4ca1af 100%);
    --text-color: #fff;
    --container-bg: rgba(0, 0, 0, 0.2);
    --button-bg: #8e44ad;
    --button-text-color: #fff;
    --result-bg: rgba(0, 0, 0, 0.3);
    --result-text-color: #fff;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-gradient);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background 0.5s, color 0.5s;
    overflow: hidden;
}

.container {
    text-align: center;
    background: var(--container-bg);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    font-weight: 600;
}

button {
    padding: 15px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    background: var(--button-bg);
    color: var(--button-text-color);
    border: none;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#result {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.number {
    background: var(--result-bg);
    color: var(--result-text-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    animation: popIn 0.5s ease-in-out forwards;
    opacity: 0;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

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

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

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

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

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

#history-container {
    margin-top: 30px;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 15px;
}

#history-container h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.history-row {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.number-set {
    display: flex;
    gap: 10px;
}
