/* 密码生成器特定样式 */

/* 密码强度指示器 */
.password-strength-meter {
    height: 8px;
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
}

.strength-weak {
    width: 25%;
    background-color: #ff4d4d;
}

.strength-medium {
    width: 50%;
    background-color: #ffaa00;
}

.strength-strong {
    width: 75%;
    background-color: #2eb82e;
}

.strength-very-strong {
    width: 100%;
    background-color: #009900;
}

/* 密码项容器 */
.password-item {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.password-item:hover {
    background-color: #e9e9e9;
}

/* 密码文本显示 */
.password-text {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 16px;
    font-weight: 500;
    word-break: break-all;
    flex-grow: 1;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    -webkit-touch-callout: none !important;
    -khtml-user-select: none !important;
    -webkit-context-menu: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* 密码操作按钮 */
.password-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    color: #555;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background-color: #ddd;
    color: #000;
}

.copy-btn::before {
    content: "📋";
}

.password-copy-btn::before {
    content: "📋";
}

.refresh-btn::before {
    content: "🔄";
}

/* 复制成功消息 */
.copied-message {
    position: absolute;
    right: 10px;
    top: -20px;
    background-color: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.show-message {
    opacity: 1;
}

/* 选项网格 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.option-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.option-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

/* 滑块容器 */
.slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-with-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-with-value input[type="range"] {
    flex-grow: 1;
}

.slider-value {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

/* 生成按钮 */
.generate-btn {
    background-color: #4285f4;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    margin: 20px 0;
}

.generate-btn:hover {
    background-color: #3367d6;
}

/* 历史记录 */
.history-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.history-password {
    font-family: monospace;
    word-break: break-all;
}

.history-time {
    color: #777;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: 10px;
}

/* 选项卡 */
.tab-container {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.tab-btn.active {
    border-bottom-color: #4285f4;
    color: #4285f4;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* 信息卡片 - 柔和色调 */
.password-info-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.password-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.password-info-card.info-card {
    text-align: left;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

.password-info-card.info-card:nth-child(3) {
    background: #f5f7fa;
}

.password-info-card.info-card:nth-child(4) {
    background: #f0f2f5;
}

.password-info-card.info-card:nth-child(5) {
    background: #f6f8fa;
}

.password-info-card.info-card:nth-child(6) {
    background: #fafbfc;
}

.password-info-card.info-card h3 {
    text-align: center;
    color: #333;
    font-size: 1.4em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.password-info-card.info-card h3::before {
    font-size: 1.2em;
}

.password-info-card.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-info-card.info-card li {
    background: #fff;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.password-info-card.info-card li:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    border-left-color: #4285f4;
}

.password-info-card.info-card li strong {
    color: #333;
    font-weight: 600;
}

.password-info-card.info-card p {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    line-height: 1.6;
    margin: 0;
    color: #555;
}

.password-info-card h3 {
    margin-top: 0;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .password-info-card {
        padding: 20px;
        margin: 20px 0;
    }
}
