/* 工具四（密码生成器）专用样式 */

/* 页面头部 */
.page-header {
    background-color: #1e1e1e;
    padding: 40px 0;
    border-bottom: 1px solid #333333;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ff4081;
}

.page-header p {
    font-size: 16px;
    color: #b0b0b0;
    max-width: 700px;
}

/* 工具主体区域 */
.password-generator {
    padding: 48px 0;
}

/* 主要内容区域布局 */
.generator-container {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

/* 控制面板 - 左侧 */
.control-panel {
    flex: 0 0 320px;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #ffffff;
    padding-bottom: 8px;
    border-bottom: 1px solid #333333;
}

/* 长度控制 */
.length-control {
    margin-bottom: 24px;
}

.length-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.length-value {
    color: #ff4081;
    font-weight: 500;
}

.length-slider {
    width: 100%;
    height: 6px;
    background-color: #2d2d2d;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4081;
    cursor: pointer;
    transition: all 0.2s;
}

.length-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #ff5c93;
}

/* 选项控制 */
.options-list {
    list-style: none;
}

.option-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background-color: #2d2d2d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    background-color: #383838;
}

.option-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #ff4081;
}

.option-label {
    color: #e0e0e0;
    flex-grow: 1;
}

.option-preview {
    color: #888888;
    font-family: monospace;
    font-size: 14px;
}

/* 预设选项 */
.preset-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.preset-btn {
    padding: 12px;
    background-color: #2d2d2d;
    border: 1px solid #333333;
    border-radius: 6px;
    color: #e0e0e0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.preset-btn:hover {
    background-color: #383838;
    border-color: #444444;
}

.preset-btn.active {
    background-color: rgba(255, 64, 129, 0.1);
    border-color: #ff4081;
    color: #ff4081;
}

/* 结果展示区 - 右侧 */
.result-panel {
    flex: 1;
    min-width: 300px;
}

.result-display {
    position: relative;
    margin-bottom: 24px;
}

.password-output {
    width: 100%;
    padding: 20px;
    padding-right: 120px;
    background-color: #2d2d2d;
    border: 1px solid #333333;
    border-radius: 6px;
    color: #ffffff;
    font-family: monospace;
    font-size: 18px;
    text-align: center;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.strength-indicator {
    margin-top: 16px;
}

.strength-label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-size: 14px;
}

.strength-meter {
    height: 8px;
    background-color: #2d2d2d;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.strength-weak {
    background-color: #cf6679;
}

.strength-medium {
    background-color: #ffb74d;
}

.strength-strong {
    background-color: #66bb6a;
}

.strength-very-strong {
    background-color: #42a5f5;
}

.strength-text {
    text-align: right;
    font-weight: 500;
    font-size: 14px;
}

/* 密码分析区域 */
.password-analysis {
    margin-top: 32px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.analysis-item {
    padding: 16px;
    text-align: center;
}

.analysis-value {
    font-size: 24px;
    font-weight: 600;
    color: #ff4081;
    margin-bottom: 4px;
}

.analysis-label {
    font-size: 13px;
    color: #b0b0b0;
}

/* 生成历史 */
.generator-history {
    margin-top: 32px;
}

.history-list {
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    margin-top: 16px;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 3px;
}

.history-item {
    padding: 12px 16px;
    background-color: #2d2d2d;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-password {
    font-family: monospace;
    color: #e0e0e0;
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-copy-btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .generator-container {
        flex-direction: column;
    }
    
    .control-panel {
        flex: 1 0 100%;
    }
    
    .password-output {
        padding-right: 80px;
        font-size: 16px;
    }
}
