/* Password Generator - Complete CSS Styling */
/* Based on provided color palette with consistent UI styling */

/* 1. COLOR VARIABLES (CSS Custom Properties) */
:root {
 /* New Primary Colors */
 --cornflower-ocean: #0e6ba8ff; /* Deep professional blue */
 --red: #ff101fff; /* Vibrant attention red */
 --white: #ffffffff; /* Pure white */
 --space-indigo: #171738ff; /* Dark sophisticated indigo */
 --sunflower-gold: #edb230ff; /* Warm accent gold */

 /* Semantic Colors (based on new palette) */
 --color-primary: var(--cornflower-ocean); /* Main brand color */
 --color-secondary: var(--space-indigo); /* Secondary dark color */
 --color-accent: var(--sunflower-gold); /* Accent/warning color */
 --color-alert: var(--red); /* Alert/attention color */
 --color-dark: var(--space-indigo); /* Dark elements */
 --color-light: var(--white); /* Light elements */

 /* Text Colors */
 --color-text: var(--space-indigo); /* Main text color */
 --color-text-light: #4a4a6d; /* Light text (derived from space-indigo) */
 --color-text-inverse: var(--white); /* Text on dark backgrounds */
 --color-background: var(--white); /* Main background */
 --color-background-alt: #f5f7fa; /* Alternate background (light blue-grey) */
 --color-border: #d1d9e6; /* Border color */

 /* Gradients (using new palette) */
 --gradient-primary: linear-gradient(135deg, var(--cornflower-ocean) 0%, var(--space-indigo) 100%);
 --gradient-accent: linear-gradient(135deg, var(--sunflower-gold) 0%, var(--red) 100%);
 --gradient-light: linear-gradient(135deg, #e6ecf5 0%, var(--white) 100%);
 --gradient-dark: linear-gradient(135deg, var(--space-indigo) 0%, #0a0a1a 100%);
 --gradient-ocean: linear-gradient(135deg, var(--cornflower-ocean) 0%, #0a4d8c 100%);

 /* Shadows (updated for new colors) */
 --shadow-sm: 0 2px 8px rgba(14, 107, 168, 0.1);
 --shadow-md: 0 4px 16px rgba(14, 107, 168, 0.15);
 --shadow-lg: 0 8px 32px rgba(14, 107, 168, 0.2);
 --shadow-accent: 0 4px 16px rgba(237, 178, 48, 0.2);
 --shadow-alert: 0 4px 16px rgba(255, 16, 31, 0.2);

 /* Transitions */
 --transition-fast: 0.2s ease;
 --transition-normal: 0.3s ease;
 --transition-slow: 0.5s ease;
 
 /* Font Weights */
 --font-weight-light: 300;
 --font-weight-regular: 400;
 --font-weight-medium: 500;
 --font-weight-semibold: 600;
 --font-weight-bold: 700;
 --font-weight-extrabold: 800;
 
 /* Layout */
 --border-radius: 12px;
 --border-radius-sm: 8px;
 --border-radius-lg: 16px;
 
 /* Password Strength Colors */
 --weak-color: var(--color-alert); /* Red */
 --medium-color: var(--color-accent); /* Gold */
 --strong-color: #10b981; /* Green */
 --very-strong-color: #059669; /* Dark Green */
}

/* 2. BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* 3. LAYOUT CONTAINERS */
.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Ensure all main containers have consistent width */
.header,
.main-content .card,
.footer {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 4. HEADER STYLES */
.header {
    background: var(--color-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* 5. BREADCRUMBS */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--color-background);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--color-primary);
}

.breadcrumb-item.current {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* Remove underline from breadcrumb links */
.breadcrumbs a {
    text-decoration: none;
    color: var(--color-text-light);
    transition: var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    color: var(--color-border);
}

/* 6. MAIN CONTENT */
.main-content {
    margin-bottom: 2rem;
}

/* 7. CONTENT GRID LAYOUT */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: var(--color-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: var(--font-weight-semibold);
}

.card h2 i {
    color: var(--color-primary);
}

.card p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

/* 8. FORM ELEMENTS - CONSISTENT STYLING */

/* Settings Group */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Individual Setting */
.setting {
    margin-bottom: 1.5rem;
}

.setting label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.setting label i {
    color: var(--color-primary);
}

/* Text Inputs - CONSISTENT STYLING */
.setting input[type="text"] {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition-normal);
    background: var(--color-background-alt);
    color: var(--color-text);
    width: 100%;
    font-family: inherit;
}

.setting input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 107, 168, 0.1);
}

/* Hint Text - CONSISTENT STYLING */
.hint,
.setting small {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* Range Slider - CONSISTENT STYLING */
input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    outline: none;
    -webkit-appearance: none;
    margin: 1rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 3px solid var(--color-background-alt);
    box-shadow: var(--shadow-md);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: 3px solid var(--color-background-alt);
    box-shadow: var(--shadow-md);
}

/* Slider Value Display */
.slider-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.slider-value span {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

/* 9. CHECKBOXES - CONSISTENT STYLING */
.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-group h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.checkbox-group h3 i {
    color: var(--strong-color);
}

.checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
}

.checkbox:hover {
    background: var(--color-border);
    transform: translateY(-2px);
}

.checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: var(--color-background-alt);
    border: 2px solid var(--color-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.checkbox input:checked + .checkmark {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.checkbox input:checked + .checkmark::after {
    content: "✓";
    color: var(--color-text-inverse);
    font-size: 0.875rem;
    font-weight: var(--font-weight-bold);
}

.checkbox i {
    color: var(--color-text-light);
    font-size: 1.25rem;
}

.checkbox span {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

/* 10. BUTTONS - CONSISTENT STYLING */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

/* Primary Button */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Secondary Button */
.btn-secondary {
    background: var(--color-background-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Icon Button */
.btn-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: var(--border-radius-sm);
    background: var(--color-border);
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.btn-icon i {
    font-size: 1.25rem;
}

/* Disabled State */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Action Buttons */
.action-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* 11. PASSWORD DISPLAY - CONSISTENT STYLING */
.password-display {
    background: var(--color-background-alt);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid var(--color-border);
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    word-break: break-all;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--color-background);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border);
}

.password-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 12. PASSWORD STRENGTH INDICATOR */
.strength-indicator {
    margin: 1.5rem 0;
}

.strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.strength-label span {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

.strength-bar {
    height: 8px;
    background: var(--color-background-alt);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.strength-text {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: right;
}

/* Strength Colors */
.strength.weak .strength-fill { background: var(--weak-color); }
.strength.medium .strength-fill { background: var(--medium-color); }
.strength.strong .strength-fill { background: var(--strong-color); }
.strength.very-strong .strength-fill { background: var(--very-strong-color); }

.strength.weak .strength-text { color: var(--weak-color); }
.strength.medium .strength-text { color: var(--medium-color); }
.strength.strong .strength-text { color: var(--strong-color); }
.strength.very-strong .strength-text { color: var(--very-strong-color); }

}

.features h3, .tips h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.features h3 i {
    color: var(--strong-color);
}

.tips h3 i {
    color: var(--color-accent);
}

.features ul, .tips ul {
    list-style: none;
    padding-left: 0;
}

.features li, .tips li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-light);
}

.features li i {
    color: var(--strong-color);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.tips li i {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* 13. FOOTER */
.footer {
    background: var(--color-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

.copyright i {
    color: var(--color-primary);
}

.version {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.version i {
    color: var(--color-primary);
    margin-right: 0.25rem;
}

/* 14. MESSAGES */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: var(--font-weight-medium);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
}

.message-success {
    background: #10b981;
    color: white;
    border-left: 4px solid #059669;
}

.message-error {
    background: var(--color-alert);
    color: white;
    border-left: 4px solid #cc0c1c;
}

.message-info {
    background: var(--color-primary);
    color: white;
    border-left: 4px solid var(--color-secondary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

}

/* 15. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .checkboxes {
        grid-template-columns: 1fr;
    }
    
    .password-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
        flex-direction: column;
    }
}

/* 16. ACCESSIBILITY */
.visually-hidden {
    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 */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}