body {
    font-family: Arial, sans-serif;
    display: flex;
    /* justify-content: center; */
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

main {
    padding: 8px;
    flex: 1;
}

.container {
    max-width: 400px;
    width: 100%;
    text-align: center;
    background: white;
    padding: 0.5rem 0px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.container form {
    padding: 0.5rem;
}

#toggle-lang,
#toggle-theme {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 14px;
    height: 24px;
    border: 1px solid #222 !important;
    padding: 2px 8px !important;
    border-radius: 3px !important;
}

.wifi-config {
    display: flex;
    flex-direction: column;
}

.wifi-config .form-group {
    display: flex;
    flex-direction: column;
}

.wifi-config .form-group input {
    width: 100%;
}

.wifi-config label {
    margin-top: 10px;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.buttons-container button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
}

#qrcode {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img {
    max-width: 90%;
    height: auto;
}

.spinner {
    margin-top: 20px;
    font-size: 48px;
    color: #007BFF;
}

/* Spinner animation */
.spinner:after {
    content: " ";
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 0.2em solid #007BFF;
    border-color: #007BFF transparent #007BFF transparent;
    animation: spinner 1.2s linear infinite;
}

@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

body.light {
    background-color: #f0f0f0;
    color: #222;
}

body.dark {
    background-color: #181818;
    color: #f0f0f0;
}

body.dark .container {
    background: #232323;
    color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

body.light .container {
    background: white;
    color: #222;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

button#toggle-theme {
    margin-left: 10px;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

body.dark button#toggle-theme {
    background: #333;
    color: #f0f0f0;
}

body.light button#toggle-theme {
    background: #eee;
    color: #222;
}

#download-qrcode {
    min-width: 200px;
    margin-top: 24px;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background-color: #28a745;
    color: white;
    font-size: 1.5rem;
}