* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0.5rem 0;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    margin-right: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

header h1 a:hover {
    opacity: 1;
}

.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.generator-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.generator-card h2 {
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #555;
}

.length-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.length-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    appearance: none;
}

.length-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.length-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#length-display {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.8rem;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin: 2rem 0;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.password-result {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.password-result.hidden {
    display: none;
}

.password-result h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.password-display {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.password-display input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background: white;
}

.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #6c757d;
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.9rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-fill.weak {
    width: 25%;
    background: #dc3545;
}

.strength-fill.fair {
    width: 50%;
    background: #ffc107;
}

.strength-fill.good {
    width: 75%;
    background: #28a745;
}

.strength-fill.strong {
    width: 100%;
    background: #007bff;
}

.security-tips {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 8px;
}

.security-tips h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.security-tips ul {
    list-style: none;
    padding: 0;
}

.security-tips li {
    padding: 0.3rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
}

.security-tips li::before {
    content: "•";
    color: #007bff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .generator-card {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .strength-indicator {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
