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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
}

h1 {
    color: #2d3748;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
}

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 40px;
}

#togglePassword {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#togglePassword svg {
    fill: #4a5568;
}

.generate-btn {
    width: 100%;
    padding: 1rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.generate-btn:hover {
    background: #5a67d8;
}

.qr-output {
    margin-top: 2rem;
    text-align: center;
}

#qrcode {
    margin: 0 auto;
    max-width: 100%;
}

#qrcode canvas {
    max-width: 100%;
    height: auto;
}

.download-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background: #38a169;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

.dark-mode {
    background: linear-gradient(135deg, #1a1c2c 0%, #4a2c5d 100%);
}

.dark-mode .container {
    background: #2d3748;
    color: #fff;
}

.dark-mode h1 {
    color: #fff;
}

.dark-mode label {
    color: #e2e8f0;
}

.dark-mode input, 
.dark-mode select {
    background: #4a5568;
    border-color: #718096;
    color: #fff;
}

.dark-mode #togglePassword svg {
    fill: #e2e8f0;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #667eea;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background: #5a67d8;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.reset-btn {
    width: 100%;
    padding: 1rem;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reset-btn:hover {
    background: #c53030;
}

.watermark {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.dark-mode .watermark {
    color: rgba(255, 255, 255, 0.5);
}