/* Password Generator Tool Specific Styles */

.tool-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.tool-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tool-description {
    text-align: center !important;
    margin: 1.5rem 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Password Display */
.password-display {
    margin-bottom: 2rem;
}

.password-field {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.password-field input {
    flex: 1;
    padding: 1rem;
    font-size: 1.125rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.password-field input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.copy-btn,
.refresh-btn {
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover,
.refresh-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.copy-btn:active,
.refresh-btn:active {
    transform: translateY(0);
}

/* Password Strength Indicator */
.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-text {
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 80px;
    text-align: center;
}

/* Generator Options */
.generator-options {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.generator-options h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.generator-options h3::before {
    content: "⚙️";
    font-size: 1.5rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.option-label span {
    font-size: 1rem;
}

#lengthValue {
    color: var(--primary-color);
    font-weight: 600;
}

#lengthSlider {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

#lengthSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#lengthSlider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

#lengthSlider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

#lengthSlider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.checkbox-option:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-option input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-option input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Preset Buttons */
.preset-buttons {
    margin-top: 2rem;
}

.preset-buttons h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.preset-btn {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.preset-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.preset-btn:active {
    transform: translateY(0);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.generate-btn,
.generate-multiple-btn {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
}

.generate-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.generate-multiple-btn {
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.generate-multiple-btn:hover {
    background-color: var(--border-color);
    transform: translateY(-1px);
}

/* Multiple Passwords */
.multiple-passwords {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.multiple-passwords h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.passwords-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.password-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.password-number {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 30px;
}

.password-item input {
    flex: 1;
    padding: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.copy-password-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.copy-password-btn:hover {
    background-color: var(--accent-color);
}

.clear-multiple-btn {
    background-color: var(--error-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.clear-multiple-btn:hover {
    background-color: #dc2626;
}

/* Password Security Tips */
.password-info {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.password-info h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-info h3::before {
    content: "💡";
    font-size: 1.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip {
    text-align: center;
    padding: 1rem;
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tip h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.tip p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .password-field {
        flex-direction: column;
    }
    
    .copy-btn,
    .refresh-btn {
        width: 100%;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .preset-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .generate-btn,
    .generate-multiple-btn {
        width: 100%;
        min-width: auto;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .password-strength {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .strength-text {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .generator-options,
    .multiple-passwords,
    .password-info {
        padding: 1rem;
    }
    
    .password-field input {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .option-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .preset-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.password-field input:focus,
.copy-btn:focus,
.refresh-btn:focus,
.preset-btn:focus,
.generate-btn:focus,
.generate-multiple-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.checkbox-option:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animation for password generation */
.password-field input.generating {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Print Styles */
@media print {
    .generator-options,
    .action-buttons,
    .multiple-passwords,
    .password-info {
        display: none;
    }
    
    .password-display {
        border: 1px solid #000;
        padding: 1rem;
        background: white;
    }
} 