/* AMuBBS - 认证页 & 用户页样式 */

.auth-page {
    min-height: calc(100vh - var(--navbar-height));
    display: flex; align-items: center; justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--bg) 50%, var(--gray-50) 100%);
}
.auth-card {
    width: 100%; max-width: 420px;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 32px;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .3s, transform .3s;
    animation: authCardIn .4s ease-out;
}
.auth-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.auth-header p { font-size: 13px; color: var(--text-muted); }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--gray-700); }
.auth-card .form-input {
    width: 100%; padding: 11px 14px;
    border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
}
.auth-card .form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.1); }
.auth-card .btn-primary {
    width: 100%; padding: 11px; font-size: 14px; font-weight: 600;
    margin-top: 8px; border-radius: 10px;
    transition: transform .15s, box-shadow .15s;
}
.auth-card .btn-primary:active { transform: scale(.98); }
.auth-links { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-links a { color: var(--primary); }
.auth-links a:hover { text-decoration: underline; }

/* 密码眼睛按钮 */
.input-pwd-wrap { position: relative; }
.input-pwd-wrap .form-input { padding-right: 40px; }
.pwd-eye-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--gray-400); cursor: pointer;
    padding: 4px; display: flex; align-items: center; transition: color .2s;
}
.pwd-eye-btn:hover { color: var(--text-secondary); }
html.dark .pwd-eye-btn { color: var(--text-muted); }
html.dark .pwd-eye-btn:hover { color: var(--text); }

/* 个人中心 */
.profile-card { padding: 0 !important; overflow: hidden; }
.profile-header {
    display: flex; align-items: center; gap: 20px; padding: 24px;
    background: var(--bg-card); border: none; margin-bottom: 0;
    border-radius: 0;
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar-wrap .avatar-lg { border: 3px solid var(--gray-100); }
.profile-info { flex: 1; min-width: 0; }
.profile-name-row {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.profile-name-row h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }
.profile-info .profile-group { font-size: 11px; color: #fff; font-weight: 500; background: var(--primary); padding: 2px 10px; border-radius: var(--radius); display: inline-block; }
.profile-signature { font-size: 13px; color: var(--text-secondary); font-style: italic; margin-top: 4px; margin-bottom: 8px; }
.profile-stats-row {
    display: flex; gap: 24px; margin-top: 10px;
}
.profile-stat-item { display: flex; flex-direction: column; align-items: center; }
.profile-stat-item strong { font-size: 16px; font-weight: 700; color: var(--text); }
.profile-stat-item span { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
/* 等级进度条 */
.profile-level-bar {
    padding: 12px 24px 16px; background: var(--gray-50);
    border-top: 1px solid var(--border-light);
}
.profile-level-info {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
    font-size: 13px; color: var(--text-secondary);
}
.profile-level-pct { font-weight: 600; color: var(--primary); }
.profile-level-track { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.profile-level-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
/* 快捷入口 */
.profile-shortcuts {
    display: flex; gap: 12px; margin-bottom: 16px; overflow-x: auto;
}
.profile-shortcut-item {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
    padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); text-decoration: none;
    transition: all var(--transition);
}
.profile-shortcut-item:hover { border-color: var(--primary); background: var(--primary-light); }
.shortcut-icon {
    width: 36px; height: 36px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-shortcut-item span { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.thread-flow-item {
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.thread-flow-item:last-child { border-bottom: none; }
.thread-flow-body { min-width: 0; }
.thread-flow-title {
    display: block; font-size: 14px; font-weight: 500; color: var(--text);
    line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transition: color var(--transition);
}
.thread-flow-title:hover { color: var(--primary); }
.thread-flow-meta {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 4px; font-size: 12px; color: var(--text-muted);
}
.profile-info h2 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.profile-info .profile-group { font-size: 11px; color: #fff; font-weight: 500; background: var(--primary); padding: 2px 10px; border-radius: var(--radius); display: inline-block; }
.profile-stats { display: flex; gap: 20px; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.profile-stats span strong { color: var(--text); font-weight: 700; }
.profile-signature { font-size: 13px; color: var(--text-secondary); font-style: italic; margin-top: 8px; }

/* 标签页 */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-item {
    padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--text-muted);
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
    white-space: nowrap; transition: all var(--transition); background: none;
    border-top: none; border-left: none; border-right: none;
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 公开主页 — 复用 .profile-header / .profile-name-row / .profile-stats-row 等个人中心样式 */

/* 通知页 */
.notification-item {
    display: flex; gap: 12px; padding: 12px 14px; background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 8px; transition: all var(--transition);
    border: 1px solid var(--border);
}
.notification-item:last-child { margin-bottom: 0; }
.notification-item:hover { border-color: var(--gray-300); background: var(--gray-50); }
.notification-item.unread { background: rgba(59,130,246,.02); border-color: var(--primary-100); }
.notification-icon {
    width: 36px; height: 36px; border-radius: var(--radius);
    background: rgba(59,130,246,.06); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--primary);
}
.notification-item.unread .notification-icon { background: var(--primary-light); color: var(--primary); }
.notification-icon svg { width: 18px; height: 18px; }
.notification-body { flex: 1; min-width: 0; }
.notification-title { font-size: 14px; color: var(--text); line-height: 1.5; }
.notification-title a { font-weight: 600; }
.notification-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 关注列表 */
.follow-list-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    margin-bottom: 8px; border: 1px solid var(--border);
    transition: all var(--transition);
}
.follow-list-item:last-child { margin-bottom: 0; }
.follow-list-item:hover { border-color: var(--gray-300); background: var(--gray-50); }
.follow-list-body { flex: 1; min-width: 0; }
.follow-list-name { font-weight: 500; font-size: 14px; color: var(--text); }
.follow-list-name:hover { color: var(--primary); }
.follow-list-sig { font-size: 12px; color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-list-time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

@media (min-width: 640px) { .auth-card { padding: 44px 36px; } .profile-header { gap: 24px; padding: 24px; } }
@media (max-width: 767px) {
    .auth-page { padding: 24px 12px; }
    .auth-card { padding: 28px 20px; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
    .auth-card .form-input { padding: 12px 14px; font-size: 16px; min-height: 44px; } /* 防止 iOS 缩放 */
    .auth-card .btn-primary { min-height: 44px; }
    .auth-header h1 { font-size: 20px; }
    .auth-header p { font-size: 12px; }
    /* 个人中心 */
    .profile-header { padding: 16px; gap: 14px; flex-direction: column; align-items: center; text-align: center; }
    .profile-name-row { justify-content: center; }
    .profile-name-row h2 { font-size: 17px; }
    .profile-stats-row { gap: 16px; justify-content: center; }
    .profile-stat-item strong { font-size: 14px; }
    .profile-signature { font-size: 12px; }
    .profile-level-bar { padding: 10px 16px 14px; }
    .profile-level-info { font-size: 12px; }
    .profile-shortcuts { gap: 8px; margin-bottom: 12px; }
    .profile-shortcut-item { padding: 10px 12px; gap: 6px; flex-direction: column; align-items: center; min-height: 44px; }
    .shortcut-icon { width: 32px; height: 32px; }
    .shortcut-icon svg { width: 18px; height: 18px; }
    .profile-shortcut-item span { display: none; }
    .tabs { margin-bottom: 14px; }
    .tab-item { padding: 10px 14px; font-size: 12px; min-height: 40px; }
    .thread-flow-item { padding: 10px 0; }
    .thread-flow-title { font-size: 13px; }
    .thread-flow-meta { gap: 6px; font-size: 11px; }
    /* 通知 */
    .notification-item { padding: 10px 12px; gap: 10px; margin-bottom: 6px; }
    .notification-icon { width: 32px; height: 32px; }
    .notification-icon svg { width: 16px; height: 16px; }
    .notification-title { font-size: 13px; }
    .notification-time { font-size: 11px; }
    /* 关注列表 */
    .follow-list-item { padding: 10px 12px; gap: 10px; }
    .follow-list-name { font-size: 13px; }
    .follow-list-sig { font-size: 11px; }
}
/* 暗色模式 */
html.dark .auth-page { background: linear-gradient(135deg, var(--gray-900) 0%, var(--bg) 50%, var(--gray-900) 100%); }
html.dark .auth-card {
    background: var(--bg-card); border-color: var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
}
html.dark .auth-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.25); }
html.dark .auth-header h1 { color: var(--text); }
html.dark .auth-header p { color: var(--text-muted); }
html.dark .auth-card .form-label { color: var(--text-secondary); }
html.dark .auth-card .form-input {
    background: var(--bg-secondary); border-color: var(--border);
    color: #e2e8f0; -webkit-text-fill-color: #e2e8f0; caret-color: #e2e8f0;
}
html.dark .auth-card .form-input::placeholder { color: #64748b; -webkit-text-fill-color: #64748b; }
html.dark .auth-card .form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
html.dark .auth-card .btn-primary { box-shadow: 0 2px 8px rgba(59,130,246,.3); }
html.dark .auth-links { color: var(--text-muted); }
html.dark .auth-links a { color: var(--primary); }
html.dark .profile-header { background: var(--bg-card); }
html.dark .profile-avatar-wrap .avatar-lg { border-color: var(--border); }
html.dark .profile-level-bar { background: var(--gray-800); border-color: var(--border); }
html.dark .profile-shortcut-item { background: var(--bg-card); border-color: var(--border); }
html.dark .profile-shortcut-item:hover { border-color: var(--primary); }
html.dark .notification-item { background: var(--bg-card); border-color: var(--border); }
html.dark .notification-item:hover { background: var(--gray-800); border-color: var(--gray-600); }
html.dark .notification-item.unread { background: rgba(59,130,246,.05); }
html.dark .follow-list-item { background: var(--bg-card); border-color: var(--border); }
html.dark .follow-list-item:hover { background: var(--gray-800); border-color: var(--gray-600); }

@media (max-width: 374px) {
    .auth-card { padding: 24px 16px; border-radius: 12px; }
    .auth-header h1 { font-size: 18px; }
    .profile-header { padding: 12px; }
    .profile-name-row h2 { font-size: 15px; }
    .profile-stats-row { gap: 12px; }
    .profile-shortcuts { gap: 6px; }
    .profile-shortcut-item { padding: 8px; }
    .notification-item { padding: 8px 10px; }
    .follow-list-item { padding: 8px 10px; }
}
