/* =====================================================
   校园网 - 全局样式表
   Campus Network - Global Styles
   ===================================================== */

/* CSS变量定义 */
:root {
    --primary-color: #1a5f7a;      /* 主色调 - 深蓝色 */
    --primary-dark: #134b61;       /* 主色深色 */
    --secondary-color: #c9a227;    /* 金色 - 用于积分、排行 */
    --accent-color: #e8505b;       /* 强调色 - 用于按钮 */
    --success-color: #28a745;      /* 成功色 */
    --warning-color: #ffc107;      /* 警告色 */
    --danger-color: #dc3545;       /* 危险色 */
    --info-color: #17a2b8;         /* 信息色 */
    
    --text-primary: #2d3436;       /* 主文字色 */
    --text-secondary: #636e72;     /* 次要文字色 */
    --text-muted: #b2bec3;         /* 弱文字色 */
    
    --bg-primary: #ffffff;         /* 主背景色 */
    --bg-secondary: #f5f6fa;       /* 次要背景色 */
    --bg-dark: #2d3436;            /* 深色背景 */
    
    --border-color: #dfe6e9;       /* 边框颜色 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

/* =====================================================
   顶部导航栏
   ===================================================== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-main {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
}

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

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    gap: 8px;
}

.nav-item {
    color: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.header-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 25px;
    padding: 8px 16px;
    width: 280px;
}

.header-search input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    padding: 4px;
}

.header-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search button {
    background: transparent;
    color: white;
    padding: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-btn {
    position: relative;
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 10px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    background: rgba(255,255,255,0.2);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.user-menu:hover {
    background: rgba(255,255,255,0.15);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

.user-name {
    color: white;
    font-weight: 500;
}

.user-coins {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--secondary-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* =====================================================
   主内容区域
   ===================================================== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 90px 20px 40px;
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 24px;
}

/* =====================================================
   左侧边栏
   ===================================================== */
.sidebar-left {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.user-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.user-card-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 12px;
}

.user-card-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-card-role {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 16px;
}

.user-card-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.checkin-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 20px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.checkin-title {
    font-size: 16px;
    margin-bottom: 8px;
}

.checkin-coins {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.checkin-btn {
    background: var(--secondary-color);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.checkin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.checkin-btn.disabled {
    background: rgba(255,255,255,0.3);
    cursor: not-allowed;
}

.checkin-streak {
    margin-top: 12px;
    font-size: 13px;
    opacity: 0.9;
}

.category-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.category-item:hover,
.category-item.active {
    background: var(--bg-secondary);
}

.category-icon {
    font-size: 18px;
}

.category-name {
    flex: 1;
}

.category-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================================================
   中间内容区
   ===================================================== */
.content-main {
    min-width: 0;
}

/* 轮播图 */
.carousel {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.carousel-container {
    position: relative;
    height: 350px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.carousel-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.carousel-desc {
    opacity: 0.9;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--transition-fast);
    opacity: 0;
}

.carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: white;
    box-shadow: var(--shadow-md);
}

.carousel-nav.prev { left: 15px; }
.carousel-nav.next { right: 15px; }

/* 发布框 */
.post-editor {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

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

.editor-tabs {
    display: flex;
    gap: 4px;
    flex: 1;
}

.editor-tab {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.editor-tab.active {
    background: var(--primary-color);
    color: white;
}

.editor-input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: none;
    margin-bottom: 12px;
    min-height: 100px;
}

.editor-input:focus {
    border-color: var(--primary-color);
}

.editor-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-buttons {
    display: flex;
    gap: 8px;
}

.tool-btn {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.tool-btn:hover {
    background: var(--primary-color);
    color: white;
}

.editor-submit {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.editor-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 帖子列表 */
.posts-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-item {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.filter-item:hover,
.filter-item.active {
    color: var(--primary-color);
    background: rgba(26, 95, 122, 0.1);
}

.post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
}

.post-card.top {
    border: 2px solid var(--secondary-color);
}

.post-card.top::before {
    content: '置顶';
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary-color);
    color: var(--text-primary);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 0 var(--radius-lg) 0 8px;
}

.post-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

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

.post-user-info {
    flex: 1;
}

.post-user-name {
    font-weight: 600;
    color: var(--primary-color);
}

.post-user-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--text-primary);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.post-time {
    font-size: 12px;
    color: var(--text-muted);
}

.post-category {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary-color);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.post-content.expanded {
    max-height: none;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.post-image {
    border-radius: var(--radius-sm);
    aspect-ratio: 1;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.post-image:hover {
    transform: scale(1.02);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.post-tag {
    background: rgba(26, 95, 122, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.post-tag:hover {
    background: var(--primary-color);
    color: white;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.post-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

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

.post-action.liked {
    color: var(--accent-color);
}

.post-action-count {
    font-size: 13px;
}

/* =====================================================
   右侧边栏
   ===================================================== */
.sidebar-right {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.rank-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.rank-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

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

.rank-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.rank-item:nth-child(1) .rank-number {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: white;
}

.rank-item:nth-child(2) .rank-number {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
}

.rank-item:nth-child(3) .rank-number {
    background: linear-gradient(135deg, #cd7f32, #b8722d);
    color: white;
}

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.rank-user-info {
    flex: 1;
}

.rank-user-name {
    font-weight: 500;
    font-size: 14px;
}

.rank-user-coins {
    font-size: 12px;
    color: var(--secondary-color);
}

.rank-coins {
    font-weight: 600;
    color: var(--secondary-color);
}

.hot-topics {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.hot-topics-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    background: linear-gradient(135deg, rgba(26, 95, 122, 0.1), rgba(26, 95, 122, 0.05));
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topic-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.topic-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 4px;
}

/* =====================================================
   弹窗模态框
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    font-size: 24px;
    color: var(--text-muted);
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary-color);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23636e72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.btn {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

/* =====================================================
   帖子详情页
   ===================================================== */
.post-detail {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 24px;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.detail-image {
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.detail-image:hover {
    transform: scale(1.02);
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* 评论区域 */
.comments-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.comments-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-input-wrapper {
    flex: 1;
}

.comment-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    resize: none;
    min-height: 80px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

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

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

.comment-name {
    font-weight: 500;
    color: var(--primary-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comment-action {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.comment-action:hover {
    color: var(--primary-color);
}

.comment-action.liked {
    color: var(--accent-color);
}

/* =====================================================
   用户中心
   ===================================================== */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white;
    margin-bottom: 24px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-bio {
    opacity: 0.9;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    gap: 32px;
}

.profile-stat {
    text-align: center;
}

.profile-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.profile-stat-label {
    font-size: 13px;
    opacity: 0.8;
}

.tabs-nav {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 8px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

/* =====================================================
   后台管理
   ===================================================== */
.admin-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--bg-dark);
    color: white;
    padding: 20px 0;
}

admin-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-logo h2 {
    font-size: 20px;
}

.admin-menu {
    display: flex;
    flex-direction: column;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.7);
    transition: all var(--transition-fast);
}

.admin-menu-item:hover,
.admin-menu-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-main {
    background: var(--bg-secondary);
    padding: 30px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.admin-title {
    font-size: 24px;
    font-weight: 600;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card-icon.blue { background: rgba(26, 95, 122, 0.1); }
.stat-card-icon.green { background: rgba(40, 167, 69, 0.1); }
.stat-card-icon.orange { background: rgba(255, 193, 7, 0.1); }
.stat-card-icon.red { background: rgba(220, 53, 69, 0.1); }

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card-label {
    color: var(--text-muted);
}

/* 数据表格 */
.data-table {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-size: 18px;
    font-weight: 600;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
}

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

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.normal { background: rgba(40, 167, 69, 0.1); color: var(--success-color); }
.status-badge.banned { background: rgba(220, 53, 69, 0.1); color: var(--danger-color); }
.status-badge.muted { background: rgba(255, 193, 7, 0.1); color: var(--warning-color); }

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn.edit { background: rgba(26, 95, 122, 0.1); color: var(--primary-color); }
.action-btn.delete { background: rgba(220, 53, 69, 0.1); color: var(--danger-color); }
.action-btn.mute { background: rgba(255, 193, 7, 0.1); color: var(--warning-color); }
.action-btn.top { background: rgba(201, 162, 39, 0.1); color: var(--secondary-color); }

.action-btn:hover {
    opacity: 0.8;
}

/* =====================================================
   响应式设计
   ===================================================== */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 240px 1fr;
    }
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 992px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    .sidebar-left {
        display: none;
    }
    .header-search {
        width: 200px;
    }
    .nav-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-main {
        padding: 0 12px;
    }
    .logo-text {
        font-size: 18px;
    }
    .header-search {
        width: 140px;
    }
    .carousel-container {
        height: 200px;
    }
    .carousel-title {
        font-size: 18px;
    }
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    .profile-stats {
        justify-content: center;
    }
    .admin-container {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
}

/* =====================================================
   动画效果
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes coinDrop {
    0% { transform: translateY(-20px); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

.coin-animation {
    animation: coinDrop 1s ease;
}

/* 签到成功提示 */
.toast {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 3000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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