/* ============================================
   AI 面试官 v2.0 - 通用组件样式（活泼创新产品风）
   设计灵感：Duolingo + Slack + Figma
   关键词：鲜艳按钮 · 品牌色阴影 · 弹动 hover · 渐变徽章 · 大圆角表单
   说明：
   - .btn-primary 用品牌绿渐变 + --shadow-brand
   - .btn-ai 用 AI 紫渐变 + --shadow-ai（AI 功能按钮）
   - .btn-cta 用 CTA 橙渐变 + --shadow-cta（重要行动按钮）
   - 表单 focus 时品牌绿光圈，徽章用渐变背景
   ============================================ */

/* ============================================
   一、按钮系统
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-sm);
    line-height: 1.2;
    transition: transform var(--transition-bounce),
                box-shadow var(--transition-bounce),
                background var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    letter-spacing: 0.01em;
}

.btn:active:not(:disabled) {
    /* 点击下沉反馈 - Duolingo 风格 */
    transform: translateY(2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 主按钮 - 深绿到浅绿渐变 + 白字（WCAG AA 对比度 ≥ 4.5:1）
   设计决策：左上用深绿 #3b8c00，保证白字在深色部分清晰可读 */
.btn-primary {
    background: linear-gradient(135deg, #3b8c00, #58cc02);
    color: var(--text-inverse);
    box-shadow: var(--shadow-brand);
    border-color: var(--brand-500);
}

.btn-primary:hover:not(:disabled) {
    /* hover 用更深的渐变 + 上浮 2px + 提亮 5%，保持对比度 */
    background: linear-gradient(135deg, #2d6b00, #3b8c00);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-brand-lg);
    filter: brightness(1.05);
}

/* 次要按钮 - 白底 + 深紫黑字 + 浅灰边框，hover 时边框变品牌绿
   设计决策：用变量而非硬编码，暗色模式自动适配（白底→深底，深字→浅字） */
.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);        /* 深紫黑 #1e1b4b，暗色下自动转暖白 */
    border-color: var(--border-medium); /* #e7e5e4 浅灰边框 */
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--brand-500);    /* hover 边框变品牌绿 */
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* 成功按钮 - 深绿到浅绿渐变 + 白字（WCAG AA 对比度 ≥ 4.5:1） */
.btn-success {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.32);
    border-color: var(--success-dark);
}

.btn-success:hover:not(:disabled) {
    /* hover 用更深的渐变，保持白字对比度 */
    background: linear-gradient(135deg, #0f5e2e, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(34, 197, 94, 0.42);
    filter: brightness(1.05);
}

/* 危险按钮 - 深红到浅红渐变 + 白字（WCAG AA 对比度 ≥ 4.5:1） */
.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: var(--text-inverse);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.32);
    border-color: var(--danger-dark);
}

.btn-danger:hover:not(:disabled) {
    /* hover 用更深的渐变，保持白字对比度 */
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.42);
    filter: brightness(1.05);
}

/* 描边按钮 - 透明底 + 品牌色描边 */
.btn-outline {
    background: transparent;
    color: var(--brand-500);
    border-color: var(--brand-400);
}

.btn-outline:hover:not(:disabled) {
    background: var(--brand-50);
    color: var(--brand-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

/* === AI 紫按钮 - 深紫到浅紫渐变 + 白字（WCAG AA 对比度 ≥ 4.5:1）=== */
.btn-ai {
    background: linear-gradient(135deg, #6b21a8, #9333ea);
    color: var(--text-inverse);
    box-shadow: var(--shadow-ai);
    border-color: var(--ai-700);
    position: relative;
    overflow: hidden;
}

.btn-ai::before {
    /* AI 按钮光泽扫过动效 */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.6s var(--ease-smooth);
}

.btn-ai:hover:not(:disabled)::before {
    left: 150%;
}

.btn-ai:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-ai-lg);
    filter: brightness(1.05);
}

/* === CTA 橙按钮 - 深橙到浅橙渐变 + 白字（WCAG AA 对比度 ≥ 4.5:1）=== */
.btn-cta {
    background: linear-gradient(135deg, #c2410c, #ff6b35);
    color: var(--text-inverse);
    box-shadow: var(--shadow-cta);
    border-color: var(--cta-600);
}

.btn-cta:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-cta-lg);
    filter: brightness(1.05);
}

/* 按钮尺寸 */
.btn-sm {
    padding: 6px 12px;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
    width: 28px;
    height: 28px;
}

.btn-icon.btn-lg {
    width: 48px;
    height: 48px;
}

/* ============================================
   二、表单系统
   ============================================ */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea,
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color var(--transition-fast),
                box-shadow var(--transition-fast),
                background var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

/* focus 时品牌绿光圈 */
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.16);
    background: var(--bg-primary);
}

.form-input.error,
.form-select.error {
    border-color: var(--danger);
}

.form-input.error:focus,
.form-select.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.form-textarea {
    resize: vertical;
    min-height: 88px;
    line-height: var(--leading-relaxed);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    line-height: var(--leading-normal);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: var(--space-2);
    font-weight: var(--weight-medium);
}

/* ============================================
   三、徽章 / 标签系统
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.badge-primary {
    background: var(--brand-50);
    color: var(--brand-700);
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.badge-info {
    background: var(--info-light);
    color: var(--info-dark);
}

.badge-outline {
    background: transparent;
    border: 1.5px solid var(--border-medium);
    color: var(--text-secondary);
}

/* AI 紫徽章 - 用于 AI 标识 */
.badge-ai {
    background: var(--ai-50);
    color: var(--ai-700);
    border: 1px solid var(--border-ai);
}

/* ============================================
   四、小标签 / Tag
   ============================================ */

.tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.tag-brand {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--border-brand);
}

/* ============================================
   五、提示框 / Alert
   ============================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    border: 1.5px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-dark);
    border-color: var(--success-light);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-dark);
    border-color: var(--warning-light);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-dark);
    border-color: var(--danger-light);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-dark);
    border-color: var(--info-light);
}

/* ============================================
   六、搜索栏
   ============================================ */

.search-bar {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--bg-card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='2'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat 12px center;
    background-size: 18px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.16);
}

/* ============================================
   七、表格系统
   ============================================ */

/* 通用表格（任务要求新增） */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-medium);
}

.table td {
    padding: 14px 16px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.table-hover tbody tr {
    transition: background var(--transition-fast);
}

.table-hover tbody tr:hover {
    background: var(--bg-hover);
}

/* 数据表格（现有 class，保留） */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-medium);
}

.data-table td {
    padding: 14px 16px;
    font-size: var(--text-sm);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* 排序指示器 */
.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    transition: color var(--transition-fast);
}

th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}

th.sortable:hover {
    color: var(--brand-500);
}

/* ============================================
   八、进度条 - 渐变填充
   ============================================ */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    /* 进度条流光动效 */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* ============================================
   九、空状态（layout.css 已定义，此处保留兼容）
   ============================================ */

.empty-state {
    padding: var(--space-12) var(--space-6);
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: var(--space-4);
    opacity: 0.6;
}

.empty-state-title {
    font-size: var(--text-lg);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: var(--leading-relaxed);
}

.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

/* ============================================
   十、加载状态
   ============================================ */

.loading-spinner,
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-medium);
    border-top-color: var(--brand-400);
    border-right-color: var(--brand-300);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载点 - 用于 AI 生成中的"思考中"提示 */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.loading-dots::before,
.loading-dots::after,
.loading-dots {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-400);
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots::before { animation-delay: -0.32s; }
.loading-dots::after  { animation-delay: 0.32s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 252, 247, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    flex-direction: column;
    gap: var(--space-4);
}

/* ============================================
   十一、分页
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.pagination button {
    padding: 8px 14px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    transition: all var(--transition-bounce);
    min-width: 38px;
}

.pagination button:hover:not(:disabled):not(.active) {
    background: var(--brand-50);
    border-color: var(--brand-400);
    color: var(--brand-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand);
}

.pagination button.active {
    background: var(--gradient-brand);
    color: var(--text-inverse);
    border-color: var(--brand-500);
    box-shadow: var(--shadow-brand);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   十二、统计卡片
   ============================================ */

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-bounce),
                box-shadow var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

/* 卡片顶部装饰渐变条 */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-brand);
    opacity: 0.85;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-label {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value,
.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: all var(--transition-base);
}

.stat-card-change {
    font-size: var(--text-xs);
    margin-top: var(--space-2);
    font-weight: var(--weight-semibold);
}

.stat-card-change.up   { color: var(--success-dark); }
.stat-card-change.down { color: var(--danger-dark); }

.stat-card:hover .stat-value {
    transform: scale(1.05);
    color: var(--brand-500);
}

/* ============================================
   十三、批量操作工具栏
   ============================================ */

.batch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-brand);
    border: 1.5px solid var(--border-brand);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-brand);
    animation: slideDown var(--transition-bounce);
}

.batch-count {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: var(--weight-medium);
}

.batch-count strong {
    color: var(--brand-600);
    font-family: var(--font-display);
    font-size: var(--text-base);
}

.batch-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.batch-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--brand-400);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   十四、通知中心
   ============================================ */

.notification-bell {
    position: relative;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: background var(--transition-bounce),
                transform var(--transition-bounce);
}

.notification-bell:hover {
    background: var(--bg-brand);
    transform: scale(1.05) rotate(-5deg);
}

.bell-icon {
    font-size: var(--text-xl);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--gradient-cta);
    color: var(--text-inverse);
    font-size: 11px;
    font-weight: var(--weight-bold);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-primary);
    box-shadow: var(--shadow-cta);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.12); }
}

.notification-panel {
    position: fixed;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    z-index: var(--z-dropdown);
    overflow: hidden;
    animation: slideDown var(--transition-bounce);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.notification-mark-all {
    font-size: var(--text-xs);
    color: var(--brand-500);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: var(--weight-semibold);
    transition: color var(--transition-fast);
}

.notification-mark-all:hover {
    color: var(--brand-700);
    text-decoration: underline;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    background: var(--bg-brand);
    border-left: 3px solid var(--brand-400);
}

.notification-item.unread:hover {
    background: var(--brand-50);
}

.notification-type {
    font-size: var(--text-xl);
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin-bottom: 2px;
    font-family: var(--font-display);
}

.notification-message {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: var(--leading-normal);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.notification-empty {
    padding: var(--space-8);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ============================================
   十五、头像 / Avatar
   ============================================ */

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    color: var(--text-inverse);
    font-family: var(--font-display);
    font-weight: var(--weight-bold);
    font-size: var(--text-sm);
    text-transform: uppercase;
    box-shadow: var(--shadow-brand);
    flex-shrink: 0;
    transition: transform var(--transition-bounce);
}

.avatar:hover {
    transform: scale(1.05);
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: var(--text-xs);
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: var(--text-lg);
}

/* AI 风格头像 - 紫色渐变 */
.avatar-ai {
    background: var(--gradient-ai);
    box-shadow: var(--shadow-ai);
}

/* ============================================
   十六、下拉菜单 / Dropdown
   ============================================ */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: var(--z-dropdown);
    display: none;
    animation: slideDown var(--transition-bounce);
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--brand-700);
}

/* ============================================
   十七、提示 / Tooltip
   ============================================ */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: var(--space-1) var(--space-3);
    background: var(--text-primary);
    color: var(--text-inverse);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    z-index: var(--z-tooltip);
    box-shadow: var(--shadow-md);
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   十八、上传区 / Upload Zone
   ============================================ */

.upload-zone {
    border: 2.5px dashed var(--border-dark);
    border-radius: var(--radius-xl);
    padding: var(--space-8) var(--space-6);
    text-align: center;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all var(--transition-bounce);
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--brand-400);
    background: var(--bg-brand);
    transform: scale(1.01);
    box-shadow: var(--shadow-brand);
}

.upload-zone-icon {
    font-size: 48px;
    margin-bottom: var(--space-3);
    display: block;
}

.upload-zone-text {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.upload-zone-hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* ============================================
   十九、搜索高亮 + 标记
   ============================================ */

mark {
    background: var(--accent-200);
    color: var(--accent-600);
    padding: 1px 4px;
    border-radius: var(--radius-xs);
    font-weight: var(--weight-semibold);
}

/* ============================================
   二十、动画 keyframes
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   二十一、技能标签（增强版）
   ============================================ */

.skill-tag-expert {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8) !important;
    color: #9d174d !important;
    border: 1.5px solid #f9a8d4 !important;
    font-weight: var(--weight-bold) !important;
}

.skill-tag-proficient {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe) !important;
    color: var(--ai-700) !important;
    border: 1.5px solid var(--ai-300) !important;
    font-weight: var(--weight-semibold) !important;
}

.skill-tag-familiar {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1.5px solid var(--border-medium) !important;
}

/* ============================================
   二十二、竞争力评分条
   ============================================ */

.competitiveness-bar {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    height: 8px;
    overflow: hidden;
}

.competitiveness-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-smooth);
}

.competitiveness-fill.high {
    background: linear-gradient(90deg, var(--brand-400), var(--brand-500));
    box-shadow: 0 0 8px rgba(88, 204, 2, 0.4);
}

.competitiveness-fill.medium {
    background: linear-gradient(90deg, var(--accent-400), var(--cta-500));
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.3);
}

.competitiveness-fill.low {
    background: linear-gradient(90deg, var(--danger), var(--danger-dark));
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* ============================================
   二十三、简历快筛页面
   ============================================ */

.screening-item {
    transition: background 0.15s var(--ease-smooth);
    border-radius: var(--radius-md);
}

.screening-item:hover {
    background: var(--bg-hover);
}

.screening-item img {
    transition: transform var(--transition-bounce);
}

.screening-item:hover img {
    transform: scale(1.08) rotate(-2deg);
}

.match-result-item {
    transition: all var(--transition-bounce);
    border-radius: var(--radius-lg);
}

.match-result-item:hover {
    border-color: var(--ai-400) !important;
    box-shadow: var(--shadow-ai);
    transform: translateY(-3px);
}

/* AI 新功能徽章 - 闪烁脉冲 */
.nav-badge-new {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-weight: var(--weight-bold);
    background: var(--gradient-cta);
    color: var(--text-inverse);
    box-shadow: var(--shadow-cta);
    animation: newPulse 2s ease-in-out infinite;
}

@keyframes newPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

/* 快筛列表滚动条 */
#screening-gallery::-webkit-scrollbar,
#screening-results::-webkit-scrollbar {
    width: 6px;
}

#screening-gallery::-webkit-scrollbar-thumb,
#screening-results::-webkit-scrollbar-thumb {
    background: var(--ai-300);
    border-radius: var(--radius-full);
}

#screening-gallery::-webkit-scrollbar-thumb:hover,
#screening-results::-webkit-scrollbar-thumb:hover {
    background: var(--ai-400);
}

/* 文件夹选项选中态 - AI 紫高亮 */
.folder-option.selected {
    background: var(--ai-50) !important;
    border: 2px solid var(--ai-600) !important;
    box-shadow: var(--shadow-ai);
}

/* ============================================
   二十四、响应式
   ============================================ */

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }

    .search-input {
        min-width: 0;
    }

    .batch-toolbar {
        flex-direction: column;
        gap: var(--space-2);
        align-items: stretch;
    }

    .batch-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .notification-panel {
        width: calc(100vw - 32px);
        right: 16px;
    }

    .stat-card-value,
    .stat-value {
        font-size: var(--text-2xl);
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: var(--text-sm);
    }

    .upload-zone {
        padding: var(--space-5) var(--space-4);
    }
}

/* ============================================
   二十五、图标微动画系统（可爱活力风）
   设计决策：为图标/SVG 增加弹性过渡，hover 时轻微旋转放大，增加年轻化活力
   ============================================ */

/* 图标基础样式 - 内联块 + 弹性过渡，为微动画铺垫 */
.icon {
    display: inline-block;
    vertical-align: middle;
    transition: transform 250ms var(--ease-bounce);
}

/* 导航图标 SVG - 22px 标准尺寸，颜色继承父级 */
.nav-icon-svg {
    width: 22px;
    height: 22px;
    color: inherit;
}

/* 页面标题图标 - 28px 强调尺寸，品牌绿 + 右间距 */
.page-title-icon {
    width: 28px;
    height: 28px;
    color: var(--brand-500);
    margin-right: 8px;
}

/* 按钮内图标 - 18px 小尺寸 + 右间距 + 垂直微调对齐文字
   注：用 .btn .btn-icon 后代选择器，仅匹配按钮内的图标元素，
   避免与已有 .btn-icon 按钮变体（36x36 图标按钮，见上方按钮尺寸段）冲突 */
.btn .btn-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: -3px;
}

/* === hover 微动画 - 增加年轻化活力 === */
/* 按钮内图标 hover：放大 1.15 + 轻微逆时针旋转 */
.btn:hover .icon {
    transform: scale(1.15) rotate(-5deg);
}

/* 导航项图标 hover：放大 1.2 + 顺时针旋转 */
.nav-item:hover .nav-icon-svg {
    transform: scale(1.2) rotate(5deg);
}

/* Logo 图标 hover：放大 1.1 + 逆时针旋转 10° */
.logo-icon:hover .icon {
    transform: scale(1.1) rotate(-10deg);
}

/* === 加载脉冲 - 用于 AI 思考中等待状态 === */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.05); opacity: 0.7; }
}

/* ============================================
   二十六、可爱关键帧动画
   ============================================ */

/* 弹入动画 - 从小到大带轻微回弹，用于插画/SVG 出场 */
@keyframes bounceIn {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* 摇摆动画 - 左右轻微旋转，用于空状态图标增加活力 */
@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25%      { transform: rotate(-3deg); }
    75%      { transform: rotate(3deg); }
}

/* 心跳动画 - 缩放脉动，用于强调/点赞等 */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

/* 空状态图标应用摇摆动画 - 3s 循环，活泼不死板
   注：components.css 在 layout.css 之后加载，此处覆盖 layout.css 的 bobble 动画
   v2.1：插画注入后 .empty-state-icon 被替换为 .illustration，摇摆动画转移到插画上 */
.empty-state-icon,
.illustration {
    animation: wiggle 3s ease-in-out infinite;
}

/* ============================================
   二十七、按钮波纹反馈（Material 风格点击反馈）
   设计决策：点击时白色径向光晕显现，增强点击反馈，不破坏已有阴影
   ============================================ */

/* 按钮溢出隐藏，为波纹 ::after 裁切铺垫 */
.btn {
    position: relative;
    overflow: hidden;
}

/* 波纹层 - 径向渐变白色光晕，默认透明，pointer-events 避免拦截点击 */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 300ms;
    pointer-events: none;
}

/* 点击时波纹显现 - 增强点击反馈 */
.btn:active::after {
    opacity: 1;
}

/* ============================================
   二十八、暗色模式切换按钮（固定右下角悬浮）
   ============================================ */

.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-brand);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-brand-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 999;
    transition: all var(--transition-bounce);
}

/* hover：放大 1.1 + 旋转 15°，活泼交互 */
.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
}

/* 按钮内图标尺寸 */
.theme-toggle .icon {
    width: 22px;
    height: 22px;
}

/* 暗色模式：切换为 AI 紫渐变 + 紫色阴影，呼应暗色紫黑基调 */
[data-theme="dark"] .theme-toggle {
    background: var(--gradient-ai);
    box-shadow: var(--shadow-ai-lg);
}

/* ============================================
   二十九、空状态 SVG 插画容器
   设计决策：120px 居中容器 + 品牌色投影 + 弹入出场，替代纯 emoji 更精致
   ============================================ */

.illustration {
    width: 160px;
    height: 160px;
    margin: 0 auto var(--space-5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG 插画 - 品牌色阴影 + 弹入出场动画 */
.illustration svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 16px rgba(88, 204, 2, 0.15));
    animation: bounceIn 0.8s var(--ease-bounce);
}

/* 注入插画后的空状态：增加上下间距，让插画成为视觉中心 */
.empty-state[data-illustration] {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

/* 内联图标（talents.js 等模块生成的 emoji 被替换为 SVG 后的 wrapper） */
.inline-icon-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin: 0 2px;
}
.inline-icon-wrap .icon {
    opacity: 0.85;
}

/* ============================================
   三十、表格操作列按钮组
   设计决策：flex + gap 布局，按钮间距 8px，图标居中
   解决用户反馈：三个操作按钮挨在一起无间距、图标不居中
   ============================================ */

.action-cell {
    white-space: nowrap;
}

.action-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 表格操作按钮：固定大小正方形，图标居中
   使用 !important 确保覆盖 .btn-icon / .btn-icon.btn-sm 等规则 */
.action-btns .btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--radius-sm) !important;
    position: relative;
    flex-shrink: 0;
}

/* 按钮内 SVG 图标 - 保持默认 display，作为 flex item 被居中 */
.action-btns .btn svg {
    width: 16px !important;
    height: 16px !important;
    /* 不设 display: block，让 SVG 作为 flex item 被 align-items/justify-content 居中 */
}

/* 查看/编辑/删除按钮的图标颜色 */
.action-btns .talent-view-btn {
    color: var(--brand-600);
}
.action-btns .talent-edit-btn {
    color: var(--ai-600);
}
.action-btns .talent-delete-btn {
    color: var(--danger) !important;
}

.action-btns .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 替换后的 SVG 图标按钮 - 隐藏占位 span */
.action-btns .btn-icon-svg {
    display: none;
}

/* ==================== 激活码与套餐授权相关样式 ==================== */

/* 输入框抖动动画（兑换失败时反馈） */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* 套餐状态徽章 */
.license-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.license-badge-activated { background: #dcfce7; color: #166534; }
.license-badge-free      { background: #dbeafe; color: #1e40af; }
.license-badge-expired   { background: #fee2e2; color: #991b1b; }
.license-badge-exhausted { background: #fef3c7; color: #92400e; }

/* 管理端激活码列表行 hover 效果 */
.admin-code-row {
    transition: background 0.15s ease;
}
.admin-code-row:hover {
    background: var(--gray-50);
}

/* 兑换弹窗输入框聚焦效果 */
#license-redeem-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* 剩余次数指示器（面试问题生成页） */
#iq-remaining-hint {
    transition: background 0.2s ease;
}
#iq-remaining-hint:hover {
    background: var(--gray-100);
}

/* 管理端统计卡片 hover */
.page-body .card[style*="text-align:center"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
