/* ========================================
   密码生成器样式
   ======================================== */

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
}

/* ========== 顶部导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a85a28 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: var(--shadow-primary);
}

.logo-text h1 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0; }
.logo-text p { font-size: 11px; color: var(--text-muted); margin: 0; }

/* 导航按钮 */
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-actions .btn { padding: 8px 16px; font-size: 13px; }

/* ========== 主内容区 ========== */
.main-content {
    width: 100%;
    max-width: 1000px;
    padding: 0 20px;
    padding-bottom: 50px;
    z-index: 10;
    height: calc(100vh - 140px);
}

.container { width: 100%; height: 100%; }

.passwd-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

/* ========== 卡片样式 ========== */
.settings-card,
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: rgba(255,255,255,0.02);
}

.card-header h2 { font-size: 15px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin: 0; }
.card-header h2 i { color: var(--primary-color); }

/* 单行设置项（文字与控件同行） */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 设置区域 */
.settings-card { padding: 20px; overflow-y: auto; }

.setting-group { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.setting-group:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.setting-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.setting-label .highlight { color: var(--primary-color); font-weight: 600; font-family: var(--font-mono); }

/* 滑块 */
.range-wrapper { padding: 6px 0; }
.range-input { width: 100%; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); outline: none; -webkit-appearance: none; cursor: pointer; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-color); cursor: pointer; box-shadow: 0 0 10px rgba(20, 184, 166, 0.4); }
.range-marks { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* 复选框 */
.checkbox-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-sm); }
.checkbox-item input { display: none; }
.checkmark { width: 18px; height: 18px; border: 2px solid var(--text-muted); border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checkbox-item input:checked + .checkmark { background: var(--primary-color); border-color: var(--primary-color); }
.checkmark::after { content: '\2713'; color: white; font-size: 11px; opacity: 0; }
.checkbox-item input:checked + .checkmark::after { opacity: 1; }
.label-text { font-size: 12px; color: var(--text-primary); }

/* 开关 */
.switch-item { display: flex; align-items: center; cursor: pointer; }
.switch-track { width: 40px; height: 22px; background: rgba(255, 255, 255, 0.1); border-radius: 11px; position: relative; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); }
.switch-item input { display: none; }
.switch-item input:checked + .switch-track { background: var(--primary-color); }
.switch-item input:checked + .switch-track::after { transform: translateX(18px); background: white; }

/* 模式切换 */
.mode-switch { display: flex; gap: 8px; }
.mode-btn { flex: 1; padding: 8px 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.mode-btn:hover { color: var(--text-primary); }
.mode-btn.active { background: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }

/* 生成按钮 */
.btn-generate { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--primary-color), #a85a28); border: none; border-radius: var(--radius-lg); color: white; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 16px; }
.btn-generate:hover { box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4); transform: translateY(-2px); }

/* 结果区域 */
.result-area {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.result-area::-webkit-scrollbar { width: 6px; }
.result-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.result-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); margin-bottom: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--text-primary);
}

.result-idx { color: var(--text-muted); min-width: 30px; font-size: 11px; }
.result-pass { flex: 1; letter-spacing: 0.5px; font-size: 12px; }
.result-copy-btn { padding: 4px 8px; background: transparent; border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.result-copy-btn:hover { background: var(--primary-light); border-color: var(--primary-color); color: var(--primary-color); }

/* 空状态 */
.empty-result { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; color: var(--text-muted); }
.empty-result i { font-size: 40px; opacity: 0.3; margin-bottom: 12px; }

/* 复制全部按钮 */
.btn-copy { padding: 6px 14px; background: rgba(20, 184, 166, 0.1); border: 1px solid rgba(20, 184, 166, 0.2); border-radius: var(--radius-md); color: var(--primary-color); font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.btn-copy:hover { background: var(--primary-color); color: white; }

/* Toast */
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); background: var(--primary-color); color: white; padding: 8px 20px; border-radius: var(--radius-md); font-size: 12px; z-index: 9999; opacity: 0; transition: opacity 0.3s; pointer-events: none; }

/* 响应式 */
@media (max-width: 768px) {
    .passwd-wrapper { grid-template-columns: 1fr; }
    .main-content { height: auto; padding: 80px 0; }
    .settings-card, .result-card { height: auto; max-height: 70vh; }
    .result-area { overflow-y: auto; }
    body { padding-top: 0; }
}
