/* Component Styles */


.ai-insights {
    background: rgba(215, 30, 30, 0.06);
    margin-bottom: 30px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.ai-insights .alert {
    background: rgba(280, 0, 0, 0.1);
    border-left: 4px solid #c01c1c;
    padding: 10px 25px;
    margin-top: 10px;
    border-radius: 10px;
}

/* Auth Container */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    color: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Security Status Cards */
.security-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.status-card:hover {
    transform: translateY(-5px);
}

.status-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.status-card i {
    font-size: 1.5rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Password Vault */
.vault-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.password-grid {
    display: grid;
    gap: 15px;
}

.password-item {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.password-item:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.password-info {
    flex: 1;
}

.password-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Password Strength Badge */
.password-strength-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.password-strength-badge.weak {
    background: #ef4444;
}

.password-strength-badge.fair {
    background: #f59e0b;
}

.password-strength-badge.good {
    background: #a78bfa;
}

.password-strength-badge.strong {
    background: #10b981;
}

.password-username {
    font-size: 0.9rem;
    opacity: 0.8;
}

.password-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-btn:hover {
    transform: rotate(90deg);
}

/* AI Assistant */
.ai-assistant {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1500;
}

.ai-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    transition: all 0.3s;
}

.ai-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.ai-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ai-chat.active {
    display: flex;
}

.ai-chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.ai-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
}

.ai-message.user {
    background: var(--primary);
    margin-left: auto;
}

.ai-message.bot {
    background: rgba(255,255,255,0.1);
}

.ai-chat-input {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
}

/* Self Destruct Panel */
.self-destruct-panel {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.self-destruct-panel h3 {
    color: var(--danger);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.self-destruct-panel p {
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    z-index: 3000;
}

.toast.success {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
}

.toast.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.2);
}

.toast.warning {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.2);
}

/* =============================================== */
/* PASSWORD STRENGTH INDICATOR STYLES */
/* =============================================== */

/* Password Requirements */
.password-requirements {
    margin-top: 15px;
    padding: 20px;
    background: rgba(15, 15, 35, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.requirements-title {
    font-size: 0.85rem;
    color: #a78bfa;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    background: rgba(15, 15, 35, 0.8);
    flex-shrink: 0;
}

.requirement-icon i {
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
    color: #10b981;
}

.requirement-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: all 0.3s;
}

/* Met requirement styles */
.requirement-item.met .requirement-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.requirement-item.met .requirement-icon i {
    opacity: 1;
}

.requirement-item.met .requirement-text {
    color: #10b981;
    font-weight: 600;
}

/* Unmet but focused styles */
.requirement-item.active:not(.met) .requirement-icon {
    border-color: #a78bfa;
    animation: pulseRequirement 2s infinite;
}

@keyframes pulseRequirement {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(167, 139, 250, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
    }
}

/* Overall strength indicator */
.strength-bar-container {
    margin-top: 10px;
    height: 6px;
    background: rgba(15, 15, 35, 0.8);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.4s;
    border-radius: 10px;
}

.strength-bar.weak {
    width: 25%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.strength-bar.fair {
    width: 50%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.strength-bar.good {
    width: 75%;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

.strength-bar.strong {
    width: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.strength-text {
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 0 10px currentColor;
}

/* Submit button states - FIXED: Only apply to register button */
#registerSubmitBtn.enabled {
    opacity: 1 !important;
    pointer-events: all !important;
}

#registerSubmitBtn:not(.enabled) {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* =============================================== */
/* PASSWORD GENERATOR MODAL STYLES */
/* =============================================== */

.generator-modal {
    max-width: 700px;
}

.generator-preview-section {
    background: rgba(15, 15, 35, 0.8);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.generator-preview {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin-bottom: 15px;
    word-break: break-all;
    color: #a78bfa;
    border: 2px solid rgba(167, 139, 250, 0.3);
}

.generator-strength {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.generator-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.generator-actions .btn {
    flex: 1;
    min-width: 150px;
}

/* Password Type Selection */
.generator-types {
    margin-bottom: 30px;
}

.generator-types h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.type-option {
    cursor: pointer;
}

.type-option input[type="radio"] {
    display: none;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: rgba(15, 15, 35, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(124, 58, 237, 0.2);
    transition: all 0.3s;
    text-align: center;
}

.option-card i {
    font-size: 2rem;
    color: var(--primary-light);
}

.option-card strong {
    font-size: 1rem;
}

.option-card span {
    font-size: 0.85rem;
    opacity: 0.7;
}

.type-option input[type="radio"]:checked + .option-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(167, 139, 250, 0.3));
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
}

.type-option:hover .option-card {
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

/* Generator Settings */
.generator-settings {
    background: rgba(15, 15, 35, 0.4);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.generator-settings h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.setting-group input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.setting-group.checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-group.checkboxes label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.setting-group.checkboxes label:hover {
    background: rgba(124, 58, 237, 0.2);
}

.setting-group.checkboxes input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: rgba(124, 58, 237, 0.3);
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-light);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-light);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .generator-modal {
        padding: 20px;
    }
    
    .type-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .generator-actions {
        flex-direction: column;
    }
    
    .generator-actions .btn {
        width: 100%;
    }
    
    .password-title {
        flex-direction: column;
        align-items: flex-start;
    }
}