/*
Theme Name: Password Generator
Description: Custom theme for the password generator application
Version: 1.0
Author: Password Generator Team
*/

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main App Container */
.password-generator {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-bottom: 30px;
}

/* Settings Section */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 15px;
    color: #444;
    font-size: 1.2rem;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

/* Length Slider */
.length-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.length-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

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

.length-display {
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

/* Character Options */
.character-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

/* Mode Selection */
.mode-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.mode-btn:hover {
    border-color: #667eea;
}

/* Passphrase Settings */
.passphrase-settings {
    display: none;
    margin-top: 15px;
}

.passphrase-settings.active {
    display: block;
}

.passphrase-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.passphrase-controls input,
.passphrase-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Bulk Generation */
.bulk-settings {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bulk-settings input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
}

/* Password Display */
.password-display {
    margin-bottom: 30px;
}

.password-output {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.password-field {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    word-break: break-all;
    line-height: 1.5;
    min-height: 24px;
    color: #2c3e50;
    background: transparent;
    border: none;
    width: 100%;
    resize: none;
    outline: none;
}

.password-field.hidden {
    -webkit-text-security: disc;
    text-security: disc;
}

/* Strength Indicator */
.strength-indicator {
    margin-bottom: 15px;
}

.strength-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.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: #fd7e14;
}

.strength-fill.good {
    width: 75%;
    background: #ffc107;
}

.strength-fill.strong {
    width: 100%;
    background: #28a745;
}

.strength-text {
    font-size: 14px;
    font-weight: 500;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

/* Bulk Results */
.bulk-results {
    display: none;
    margin-top: 20px;
}

.bulk-results.active {
    display: block;
}

.bulk-passwords {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.bulk-password-item {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    word-break: break-all;
}

.bulk-password-item:last-child {
    border-bottom: none;
}

/* Ad Placeholders */
.ad-banner {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
    color: #6c757d;
}

.ad-banner.top {
    margin-bottom: 30px;
}

.ad-banner.bottom {
    margin-top: 30px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .password-generator {
        padding: 20px;
    }
    
    .character-options {
        grid-template-columns: 1fr;
    }
    
    .mode-selection {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .passphrase-controls {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .password-generator {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

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