/* ============================================
   天霜小镇管理平台 - Apple Liquid Glass 风格
   ============================================ */

/* === 1. CSS 变量 === */
:root {
    --primary: #0A84FF;
    --primary-light: #409CFF;
    --primary-dark: #0066CC;
    --secondary: #5E5CE6;
    --success: #30D158;
    --warning: #FF9F0A;
    --danger: #FF453A;
    --text-primary: rgba(255, 255, 255, 0.98);
    --text-secondary: rgba(255, 255, 255, 0.72);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-border-hover: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    --blur-amount: 12px;
    --saturate-amount: 180%;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --bg-dark: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-hover: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.15);
}

/* === 2. 基础重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0a0a0a;
    background-image: url('../../images/bg01.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.02) 40%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* === 3. 液态玻璃卡片 === */
.liquid-glass {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow: hidden;
    transition: var(--transition);
}

.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 0.5px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    z-index: 2;
}

.liquid-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.liquid-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* === 4. 导航栏 === */
.navbar {
    background: rgba(18, 18, 22, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.nav-brand:hover {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    background: rgba(10, 132, 255, 0.15);
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* === 下拉菜单 === */
.user-dropdown {
    position: relative;
}

.user-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-family: inherit;
    font-size: inherit;
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.dropdown-arrow {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
}

.user-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(28, 28, 35, 0.95);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 1000;
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
    color: var(--danger);
}

/* === 手机端菜单按钮 === */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* === 手机端菜单 === */
.mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 99;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-item {
    display: block;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 1rem;
}

.mobile-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-item.danger {
    color: var(--danger);
}

.mobile-menu-item.primary {
    color: var(--primary);
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* === 5. 主容器 === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* === 6. 卡片 === */
.card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 0.5px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    z-index: 2;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(10, 132, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* === 7. 网格布局 === */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* === 8. 小镇/公会卡片 === */
.entity-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.entity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 0.5px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%
    );
    z-index: 2;
}

.entity-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.entity-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
}

.entity-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.entity-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.entity-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entity-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === 9. 按钮 === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(10, 132, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 132, 255, 0.4);
    filter: brightness(1.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #28a745 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(48, 209, 88, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(48, 209, 88, 0.4);
    filter: brightness(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc3545 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 69, 58, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* === 10. 表单 === */
.form-group {
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

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

/* select下拉选项深色适配 */
select option {
    background: #1a1a2e;
    color: #fff;
    padding: 8px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.15);
}

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

/* === 11. 帖子 === */
.post-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
    transition: var(--transition);
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* === 头像组件 === */
.avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-letter {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #0A84FF;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.avatar-wrap-lg {
    width: 80px;
    height: 80px;
}

.avatar-wrap-lg .avatar-letter {
    font-size: 2rem;
}

.avatar-wrap-sm {
    width: 32px;
    height: 32px;
}

.avatar-wrap-sm .avatar-letter {
    font-size: 0.75rem;
}

.avatar-wrap-md {
    width: 36px;
    height: 36px;
}

.avatar-wrap-md .avatar-letter {
    font-size: 0.85rem;
}

.avatar-wrap-xl {
    width: 48px;
    height: 48px;
}

.avatar-wrap-xl .avatar-letter {
    font-size: 1rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.post-content {
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.post-actions {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.post-action:hover, .post-action.liked {
    color: var(--primary);
}

/* === 12. 评论 === */
.comments-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.comment {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* === 13. 公告弹窗 === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: rgba(28, 28, 35, 0.9);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    padding: 24px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-weight: 600;
    letter-spacing: -0.3px;
}

.modal-body {
    padding: 24px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* === 14. 徽章 === */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: linear-gradient(135deg, var(--danger) 0%, #dc3545 100%);
    color: white;
}

.badge-mayor {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.badge-leader {
    background: linear-gradient(135deg, var(--success) 0%, #28a745 100%);
    color: white;
}

/* === 15. 侧边栏布局 === */
.sidebar-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.sidebar {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(var(--saturate-amount));
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(10, 132, 255, 0.15);
    color: var(--primary);
}

/* === 16. 表格 === */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.table th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    color: var(--text-secondary);
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

/* === 17. 提示消息 === */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: rgba(48, 209, 88, 0.1);
    border: 0.5px solid rgba(48, 209, 88, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 69, 58, 0.1);
    border: 0.5px solid rgba(255, 69, 58, 0.3);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 159, 10, 0.1);
    border: 0.5px solid rgba(255, 159, 10, 0.3);
    color: var(--warning);
}

/* === 18. 页脚 === */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer::before {
    content: '';
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 30%, rgba(255, 255, 255, 0.12) 70%, transparent 100%);
    margin-bottom: 32px;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.footer-icons a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}

.footer-icons a:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.copyright-brand {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.copyright-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--text-primary);
}

/* === 19. 响应式 === */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px;
    }

    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .sidebar-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .nav-links {
        display: none;
    }

    .nav-user {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu {
        display: block;
    }

    .card {
        padding: 20px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* 手机端表格适配 */
    .table {
        font-size: 0.85rem;
    }

    .table th, .table td {
        padding: 10px 8px;
    }

    /* 手机端标题适配 */
    header h1 {
        font-size: 1.3rem;
    }

    /* 手机端弹窗适配 */
    .modal {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 16px;
    }

    /* 手机端统计卡片 */
    .grid-3 {
        gap: 12px;
    }

    /* 手机端侧边栏 */
    .sidebar {
        margin-bottom: 16px;
    }

    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .sidebar-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* === 20. 入场动画 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* === 21. 滚动条美化 === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === 22. 选中文本样式 === */
::selection {
    background: rgba(10, 132, 255, 0.4);
    color: white;
}

/* === 23. iPhone 底部安全区 === */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}
