/* Password Generator Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--success));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-green {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.badge-blue {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge-purple {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

/* Generator Card */
.generator-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

/* Password Output */
.password-output-section {
    margin-bottom: 1.5rem;
}

.password-display {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.password-display input {
    flex: 1;
    padding: 1rem;
    font-size: 1.25rem;
    font-family: 'Monaco', 'Consolas', monospace;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    letter-spacing: 1px;
}

.password-display input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Strength Meter */
.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-input);
    border-radius: 999px;
    overflow: hidden;
}

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

.strength-text {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

/* Options */
.options-section {
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.option-group input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: var(--bg-input);
    border-radius: 999px;
    cursor: pointer;
}

.option-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.option-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Length Presets */
.length-presets {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.preset-btn:hover {
    border-color: var(--primary);
}

.preset-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Checkboxes */
.checkbox-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-input);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Advanced Options */
.advanced-options {
    margin-top: 1rem;
}

.advanced-options summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem;
}

.advanced-options summary:hover {
    color: var(--text);
}

.advanced-content {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.advanced-content .option-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: monospace;
}

.advanced-content .option-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    background: var(--bg-input);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--primary);
}

/* Bulk Section */
.bulk-section {
    margin-top: 1.5rem;
}

.bulk-section summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem;
}

.bulk-content {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.bulk-content .option-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bulk-content .option-group label {
    margin-bottom: 0;
    white-space: nowrap;
}

.bulk-content .option-group input[type="number"] {
    width: 100px;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
}

.bulk-output {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.bulk-password {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

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

.bulk-number {
    color: var(--text-muted);
    min-width: 30px;
}

.bulk-password code {
    flex: 1;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

.bulk-copy {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

/* Features Section */
.features {
    margin-bottom: 2rem;
}

.features h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.2s;
}

.feature:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tips Section */
.tips-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
}

.tips-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.tip {
    background: rgba(255,255,255,0.15);
    padding: 1.25rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.tip h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

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

/* Tips Section */
.tips-section {
    margin-bottom: 2rem;
}

.tips-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tip {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.tip h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.tip p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* FAQ Section */
.faq {
    margin-bottom: 2rem;
}

.faq h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.faq-category {
    margin-bottom: 1.5rem;
}

.faq-category-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}

.faq-item {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

footer p:first-child {
    color: var(--text);
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    .generator-card {
        padding: 1.25rem;
    }
    
    .password-display input {
        font-size: 1rem;
    }
    
    .checkbox-options {
        grid-template-columns: 1fr;
    }
    
    .length-presets {
        flex-wrap: wrap;
    }
    
    .preset-btn {
        flex: 1;
        min-width: 50px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
