* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

}

.container {
    width: 100%;
    max-width: 500px;
}

.generator-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 2.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header h1 i {
    color: #667eea;
}

.header p {
    color: #666;
    font-size: 1rem;
}

.password-display {
    position: relative;
    margin-bottom: 30px;
}

#passwordOutput {
    width: 100%;
    padding: 15px 50px 15px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#passwordOutput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-50%) scale(1.05);
}

.copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.controls {
    margin-bottom: 25px;
}

.length-control {
    margin-bottom: 25px;
}

.length-control label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

#lengthValue {
    color: #667eea;
    font-weight: bold;
}

.slider-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

#lengthSlider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
}

#lengthSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

#lengthSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
}

#lengthSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

#lengthInput {
    width: 70px;
    padding: 8px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.options-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.option-item:hover {
    background: #e9ecef;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

.option-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.option-label i {
    color: #667eea;
    width: 16px;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn i {
    transition: transform 0.3s ease;
}

.generate-btn:hover i {
    transform: rotate(180deg);
}

.strength-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.strength-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.5s ease;
    border-radius: 4px;
}

.strength-text {
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 600px) {
    .generator-card {
        padding: 25px;
        margin: 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .slider-container {
        flex-direction: column;
        gap: 10px;
    }
    
    #lengthInput {
        width: 100%;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}