* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
    text-align: center;
    padding: 40px;
}


.card {
    background-color: white;
    padding: 35px;
    border-radius: 18px;
    max-width: 420px;
    margin: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}


.toggle-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.mode-text {
    font-size: 14px;
    font-weight: bold;
}


.switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.4s;
}

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

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

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


h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 2px solid #ddd;
}


button {
    margin-top: 15px;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#b1 {
    background: linear-gradient(135deg, #2196f3, #0d47a1);
    color: white;
}

#b2 {
    background: linear-gradient(135deg, #f44336, #b71c1c);
    color: white;
}

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

button:active {
    transform: scale(0.95);
}


#message {
    margin-top: 25px;
    font-size: 18px;
    font-weight: bold;
    color: green;
}


body.dark-mode {
    background-color: #121212;
    color: white;
}

body.dark-mode .card {
    background-color: #1e1e1e;
}

body.dark-mode input {
    background-color: #2a2a2a;
    color: white;
    border-color: #555;
}
