:root {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --accent: #818cf8;
}

/* Light mode */
.light {
    --bg: #f4f4f4;
    --card: white;
    --text: #111;
    --accent: #6366f1;
}

body {
    margin: 0;
    padding: 20px;

    font-family: Arial, sans-serif;

    background: var(--bg);
    color: var(--text);

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 100vh;

    transition: 0.3s;
}

.container {
    width: 100%;
    max-width: 500px;

    background: var(--card);

    padding: 30px;

    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);

    transition: 0.3s;
}

h1 {
    text-align: center;
    margin-top: 0;
}

.row {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
}

button {
    transition: 0.3s ease;
}

input[type="number"] {
    width: 100%;

    padding: 12px;

    border-radius: 10px;
    border: 2px solid transparent;

    font-size: 16px;

    box-sizing: border-box;

    transition: border-color 0.2s;
}

input[type="number"].error {
    border-color: #ef4444;
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

button {
    width: 100%;

    padding: 14px;

    margin-top: 15px;

    border: none;
    border-radius: 12px;

    background: var(--accent);
    color: white;

    font-size: 16px;

    cursor: pointer;

    transition: 0.2s;
}

button:hover {
    transform: scale(1.02);
}

#password {
    margin-top: 20px;

    padding: 15px;

    border-radius: 10px;

    background: rgba(0,0,0,0.1);

    word-break: break-all;

    font-size: 20px;

    text-align: center;
}

.strength {
    margin-top: 15px;
}

.bar {
    height: 12px;

    border-radius: 10px;

    background: #ddd;

    overflow: hidden;
}

.fill {
    height: 100%;
    width: 0%;

    transition: 0.3s;
}

/* Toggle switch */
.toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.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: 0.4s;

    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";

    height: 18px;
    width: 18px;

    left: 4px;
    bottom: 4px;

    background-color: white;

    transition: 0.4s;

    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Footer */
.footer {
    margin-top: 20px;

    text-align: center;

    font-size: 12px;

    opacity: 0.5;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .options {
        grid-template-columns: 1fr;
    }

    input[type="number"] {
        padding: 10px;
        font-size: 14px;
    }
}