/*
Author：小熊猫&初心
2025 © Lisect
*/
/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    padding: 0;
}

/* 头部样式 */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    margin: 0;
}

.header-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 16px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

.like-section {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
}

.like-icon {
    margin-right: 6px;
}

.like-text {
    font-size: 14px;
}

.header-subtitle {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}

/* 通用区域样式 */
.settings-section, .result-section, .tips-section {
    background: white;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
}

.section-header {
    background: #f9fafb;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.section-icon {
    margin-right: 8px;
}

/* 设置组样式 */
.setting-group {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

/* 复选框样式 */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.label-text {
    font-weight: 500;
    margin-right: 8px;
}

.char-preview {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* 长度控制样式 */
.length-control {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.length-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.length-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.length-label {
    font-size: 14px;
    color: #6b7280;
}

/* 前缀后缀样式 */
.prefix-suffix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.text-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.text-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* 生成按钮区域 */
.generate-section {
    background: white;
    padding: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

.generate-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.generate-multiple-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.generate-multiple-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.copy-all-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.copy-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: 18px;
}

/* 密码显示区域 */
.password-display {
    padding: 20px;
}

.password-item {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.password-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: monospace;
    font-size: 16px;
    background: #f9fafb;
}

.copy-single-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-single-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 密码强度显示 */
.password-strength {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-label {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    max-width: 200px;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s;
    border-radius: 3px;
}

.strength-text {
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
}

/* 多个密码显示 */
.multiple-passwords {
    padding: 20px;
}

.multiple-hint {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #92400e;
}

.hint-icon {
    font-size: 14px;
}

.passwords-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.password-row {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.password-row:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.password-row.selected {
    background: #dbeafe;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.password-index {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.password-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    background: white;
    min-width: 0;
    cursor: pointer;
}

.password-row.selected input {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.multiple-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.action-btn-large {
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.action-btn-large:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* 提示区域 */
.tips-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.tip-icon {
    font-size: 16px;
}

/* 版权信息 */
.footer-section {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
    margin-top: 0;
}

.copyright-content {
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

.copyright-text {
    margin-bottom: 8px;
}

.separator {
    margin: 0 12px;
    color: #cbd5e1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .prefix-suffix-grid {
        grid-template-columns: 1fr;
    }
    
    .generate-section {
        flex-direction: column;
        align-items: center;
    }
    
    .password-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-single-btn {
        align-self: center;
    }
    
    .tips-content {
        grid-template-columns: 1fr;
    }
    
    .multiple-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .password-row {
        gap: 8px;
    }
    
    .password-index {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .password-row input {
        font-size: 13px;
    }
}
