:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5a623;
    --background-light: #f0f4f8;
    --text-light: #333;
    --card-light: #ffffff;
    --shadow-light: rgba(0, 0, 0, 0.1);
    
    --background-dark: #1a1a1a;
    --text-dark: #f0f0f0;
    --card-dark: #2a2a2a;
    --shadow-dark: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
    padding: 20px;
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

.container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.card {
    background-color: var(--card-light);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.dark-mode .card {
    background-color: var(--card-dark);
    box-shadow: 0 4px 6px var(--shadow-dark);
}

.head {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.subhead {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.input-section, .qr-options {
    margin-bottom: 1rem;
}

input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
}

button:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.result-card {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
}

#qrcode {
    margin: 1rem auto;
}

.qr-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.option {
    flex-basis: 48%;
    margin-bottom: 10px;
}

.option label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

#qr-color {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    padding: 2px;
}

#qr-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

#qr-color::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

#qr-color::-moz-color-swatch {
    border: none;
    border-radius: 3px;
}
#toggle-theme {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.dark-mode #toggle-theme {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

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

.card {
    animation: fadeIn 0.5s ease-out;
}

@media only screen and (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .option {
        flex-basis: 100%;
    }
}

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.qr-actions button {
    flex: 1;
    max-width: 150px;
}

#qr-reader {
    max-width: 300px;
    margin: 1rem auto;
}

.fas {
    margin-right: 5px;
}