/**
 * 驭鬼者论坛 · 终极液态玻璃 · 毛玻璃效果拉满
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b0b0b;
    color: #e0e0e0;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    opacity: 0;
    animation: pageFade 0.5s ease-out forwards;
    transition: opacity 0.3s;
}

body.page-exit {
    opacity: 0;
}

@keyframes pageFade {
    to { opacity: 1; }
}

/* ---------- 页面加载进度条 ---------- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}

.page-loader::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #f0f0f0;
    transition: width 0.3s ease;
}

.page-loader.loading::after {
    width: 80%;
}

.page-loader.finish::after {
    width: 100%;
    opacity: 0;
    transition: width 0.2s, opacity 0.3s;
}

/* ---------- 顶部栏（终极玻璃） ---------- */
.top-bar {
    background: rgba(20, 20, 20, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: background 0.3s;
    box-shadow: none !important;
    will-change: backdrop-filter;
}

.top-bar.scrolled {
    background: rgba(20, 20, 20, 0.35);
    box-shadow: none !important;
}

.top-bar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.7rem;
    cursor: pointer;
    color: #ffffff;
    padding: 0 4px;
    line-height: 1;
    transition: transform 0.3s, opacity 0.3s;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.menu-toggle:hover {
    transform: scale(1.08);
    opacity: 0.9;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.3s;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.site-title:hover {
    opacity: 0.8;
}

.top-bar-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.auth-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 40px;
    transition: background 0.3s, color 0.3s;
    font-weight: 450;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.auth-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- 顶部头像菜单（终极玻璃） ---------- */
.avatar-menu-wrapper {
    position: relative;
}

.top-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.top-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
}

.avatar-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(20, 20, 20, 0.25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 8px 0;
    min-width: 150px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s;
    z-index: 200;
    will-change: backdrop-filter;
}

.avatar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.avatar-dropdown a {
    display: block;
    padding: 12px 22px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 450;
    transition: background 0.15s;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.01em;
}

.avatar-dropdown a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: -220px;
    width: 220px;
    height: 100vh;
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    transition: left 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    padding: 0;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-title {
    padding: 24px 20px 16px;
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
}

.sidebar-nav a {
    padding: 14px 18px;
    color: #dddddd;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 450;
    transition: all 0.3s ease;
    border-radius: 14px;
    margin-bottom: 4px;
    position: relative;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 24px;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: #ffffff;
    border-radius: 4px;
    transition: height 0.3s ease;
}

.sidebar-nav a:hover::before {
    height: 50%;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- 首页大标题（终极玻璃） ---------- */
.hero-blur {
    background: rgba(20, 20, 20, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px 0 16px;
    margin-bottom: 20px;
    transition: background 0.3s;
    will-change: backdrop-filter;
}

.hero-title {
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title h1 {
    font-size: 3rem;
    font-weight: 450;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    animation: titleFloat 0.7s ease-out;
}

@keyframes titleFloat {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ---------- 主内容区域 ---------- */
.main-wrapper {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    width: 100%;
}

/* ---------- 通用卡片（深色玻璃） ---------- */
.card {
    background: rgba(25, 25, 25, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px 26px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

h2 {
    font-size: 1.6rem;
    font-weight: 450;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 18px;
    color: #f0f0f0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 统计网格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 28px 0;
}

.stat-item {
    text-align: center;
    padding: 26px 16px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(255,255,255,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 450;
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: #cccccc;
    margin-top: 8px;
}

/* 三大定律网格 */
.law-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.law-card {
    padding: 24px 18px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.law-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
    border-color: rgba(255,255,255,0.1);
}

.law-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #ffffff;
}

.law-desc {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- 帖子卡片 ---------- */
.post-card {
    display: block;
    background: rgba(25, 25, 25, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 22px 22px;
    margin-bottom: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.post-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.post-card-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.post-card-author {
    display: flex;
    flex-direction: column;
}

.post-card-username {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.95rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.post-card-time {
    font-size: 0.7rem;
    color: #bbbbbb;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.post-card-excerpt {
    color: #cccccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-card-meta {
    font-size: 0.8rem;
    color: #aaaaaa;
}

/* 删除按钮 */
.delete-btn {
    background: none;
    border: none;
    color: #aaaaaa;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 40px;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid transparent;
}

.delete-btn:hover {
    color: #ff6666;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- 帖子详情页 ---------- */
.post-detail {
    margin-bottom: 32px;
}

.post-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.post-detail-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.post-detail-author {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-detail-username {
    font-weight: 500;
    font-size: 1rem;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.post-detail-time {
    font-size: 0.75rem;
    color: #bbbbbb;
}

.post-detail-title {
    font-size: 1.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.post-detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #dddddd;
    white-space: pre-line;
    word-break: break-word;
}

/* 回复区域 */
.reply-section {
    margin-top: 32px;
    border-top: 1.5px solid rgba(255, 255, 255, 0.1);
    padding-top: 28px;
}

.reply-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reply-item:last-child {
    border-bottom: none;
}

.reply-item-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.reply-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.reply-content-wrapper {
    flex: 1;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.reply-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.reply-time {
    font-size: 0.7rem;
    color: #bbbbbb;
}

.reply-content {
    color: #dddddd;
    font-size: 0.95rem;
    line-height: 1.7;
    word-break: break-word;
}

.reply-form {
    margin-top: 32px;
}

.reply-form .btn {
    margin-top: 16px;
}

.reply-login-hint {
    margin-top: 24px;
    text-align: center;
    color: #bbbbbb;
}

.reply-login-hint a {
    color: #ffffff;
    text-decoration: underline;
}

/* ---------- 输入框 ---------- */
.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
    outline: none;
}

.form-input:focus {
    border-color: #aaaaaa;
    background: rgba(30, 30, 30, 0.8);
}

.form-input::placeholder {
    color: #999;
}

textarea.form-input {
    resize: vertical;
    min-height: 140px;
}

/* 按钮 */
.btn {
    padding: 13px 30px;
    background: #ffffff;
    color: #111;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* ---------- 发帖按钮（100%液态玻璃） ---------- */
.desktop-new-post {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255,255,255,0.1) !important;
    font-weight: 500;
    will-change: backdrop-filter;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.desktop-new-post:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255,255,255,0.2) !important;
}

.dynamic-island-post {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #ffffff;
    padding: 12px 40px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255,255,255,0.15);
    z-index: 80;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: none;
    will-change: backdrop-filter;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.dynamic-island-post:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-50%) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .dynamic-island-post {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .desktop-new-post {
        display: none;
    }
}

/* ---------- 发帖模态框 ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
    padding: 32px 28px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255,255,255,0.1);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
    opacity: 1;
}

.modal-card h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.modal-form .form-group {
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 32px;
}

.btn-cancel {
    padding: 12px 26px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 40px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.btn-submit {
    padding: 12px 32px;
    background: #ffffff;
    border: none;
    border-radius: 40px;
    color: #111;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

/* ---------- 登录/注册卡片 ---------- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 40px 20px;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    background: rgba(25, 25, 25, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 36px;
    padding: 40px 36px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    animation: cardPop 0.5s cubic-bezier(0.2, 0.9, 0.4, 1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.7);
}

@keyframes cardPop {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 2rem;
    font-weight: 450;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.auth-card .form-group {
    margin-bottom: 24px;
}

.auth-card .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.95rem;
    color: #cccccc;
}

.auth-footer a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

/* 排行榜表格 */
.table-wrapper {
    overflow-x: auto;
    margin: 0 -4px;
    padding: 0 4px;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.ranking-table th {
    text-align: left;
    padding: 16px 12px;
    font-weight: 500;
    color: #dddddd;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ranking-table td {
    padding: 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
    font-size: 0.95rem;
    color: #dddddd;
    transition: background 0.3s;
}

.ranking-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: #333;
    color: #f0f0f0;
    white-space: nowrap;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.level-badge:hover {
    transform: scale(1.05);
}

.level-Splus { background: #ffffff; color: #000; }
.level-S { background: #cccccc; color: #000; }
.level-A { background: #999999; color: #000; }
.level-B { background: #666666; color: #fff; }
.level-C { background: #444444; color: #fff; }
.level-X { background: #222222; color: #fff; }

/* 页脚 */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 16px;
    text-align: center;
    font-size: 0.8rem;
    color: #aaaaaa;
    margin-top: auto;
}

/* ---------- 头像点击上传覆盖层 ---------- */
.avatar-upload-wrapper {
    position: relative;
    cursor: pointer;
    display: inline-block;
    border-radius: 50%;
    overflow: hidden;
    width: 120px;
    height: 120px;
}

.avatar-upload-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    opacity: 0.85;
    transition: opacity 0.2s;
    pointer-events: none;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.avatar-upload-wrapper:hover .avatar-upload-overlay {
    opacity: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    display: block;
}

/* 响应式 */
@media (max-width: 768px) {
    .top-bar-container { height: 56px; }
    .site-title { font-size: 1.1rem; }
    .hero-title h1 { font-size: 2.2rem; }
    .stat-grid, .law-grid { grid-template-columns: 1fr; gap: 16px; }
    .stat-item { padding: 20px; }
    .stat-number { font-size: 2.2rem; }
    h2 { font-size: 1.5rem; }
    .card { padding: 22px 18px; }
    .post-card-title { font-size: 1.1rem; }
    .sidebar { width: 200px; }
    .delete-btn { opacity: 1; }
    .auth-card { padding: 32px 24px; }
    .post-detail-title { font-size: 1.6rem; }
    .avatar-upload-wrapper,
    .profile-avatar { width: 100px; height: 100px; }
}