/* Password Generator Styles */

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--accent-color);
    background: var(--bg-primary);
    transform: translateX(-4px);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 10px 0;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Password Container */
.password-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Password Display */
.password-display-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.password-display-card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.card-label svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

.password-display {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    margin-bottom: 16px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
    text-align: center;
    user-select: all;
}

.display-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

.action-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Strength Meter */
.strength-section {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.strength-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.strength-text {
    font-weight: 700;
    font-size: 0.9375rem;
}

.strength-text.weak {
    color: #ef4444;
}

.strength-text.fair {
    color: #f59e0b;
}

.strength-text.good {
    color: #10b981;
}

.strength-text.strong {
    color: #3b82f6;
}

.strength-text.excellent {
    color: #8b5cf6;
}

.strength-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

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

.strength-fill.weak {
    width: 20%;
    background: #ef4444;
}

.strength-fill.fair {
    width: 40%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 60%;
    background: #10b981;
}

.strength-fill.strong {
    width: 80%;
    background: #3b82f6;
}

.strength-fill.excellent {
    width: 100%;
    background: #8b5cf6;
}

/* Settings Card */
.settings-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    transition: all 0.3s;
}

.settings-card:hover {
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-label svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
}

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

.slider {
    flex: 1;
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.length-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.length-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.length-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.length-input {
    width: 60px;
    padding: 8px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.length-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Options Grid */
.options-grid {
    display: grid;
    gap: 12px;
}

.option-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-checkbox:hover {
    border-color: var(--accent-color);
    background: var(--card-bg);
}

.option-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.option-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
}

.option-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.option-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.option-example {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn svg {
    width: 28px;
    height: 28px;
    color: var(--accent-color);
    transition: all 0.3s;
}

.preset-btn:hover {
    background: var(--card-bg);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.preset-btn:hover svg {
    transform: scale(1.1);
}

.preset-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.preset-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent-color);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.generate-btn svg {
    width: 24px;
    height: 24px;
}

.generate-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

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

/* Info Panel */
.info-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.info-header svg {
    width: 20px;
    height: 20px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--accent-color);
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-generated {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .length-control {
        flex-direction: column;
        gap: 12px;
    }

    .slider {
        width: 100%;
        height: 3px;
    }

    .slider::-webkit-slider-thumb {
        width: 14px;
        height: 14px;
    }

    .slider::-moz-range-thumb {
        width: 14px;
        height: 14px;
    }

    .length-display {
        width: 100%;
        justify-content: center;
    }

    .length-input {
        width: 80px;
    }

    .display-actions {
        flex-direction: column;
    }

    .page-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .preset-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        padding: 16px;
    }

    .password-text {
        font-size: 1rem;
    }
}
