/* ==========================================
   社区平台 - 基于Tabler的自定义样式
   ========================================== */

/* 保持JS兼容的CSS变量 */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    --border-color: #e5e7eb;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --transition: all 0.2s ease;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-light: #9ca3af;
        --bg-primary: #111827;
        --bg-secondary: #1f2937;
        --bg-tertiary: #374151;
        --border-color: #374151;
    }
}

/* ==========================================
   导航栏
   ========================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 3.5rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
}

.nav-search {
    display: flex;
    flex: 1;
    max-width: 480px;
    margin: 0 2rem;
}

.nav-search .input-icon {
    position: relative;
    width: 100%;
}

.nav-search .input-icon i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.nav-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--bg-primary);
}

.nav-search button {
    display: none;
}

.nav-menu {
    display: flex;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
}

.nav-links a i {
    font-size: 1.125rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.user-actions .btn {
    white-space: nowrap;
}

.user-profile {
    position: relative;
}

.user-profile img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border-color);
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 10rem;
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.user-dropdown a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================
   按钮
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

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

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

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

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

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

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

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-lg);
}

.btn i {
    font-size: 1rem;
}

/* ==========================================
   表单
   ========================================== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    line-height: 1.5;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input:disabled,
.form-group textarea:disabled {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

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

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input:disabled {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
}

/* ==========================================
   英雄区域
   ========================================== */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #6366f1 100%);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.hero-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.hero-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.hero-stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ==========================================
   通用区块
   ========================================== */
.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-all {
    color: var(--primary-color);
    font-weight: 500;
    font-size: var(--font-size-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* ==========================================
   帖子卡片
   ========================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

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

.post-meta {
    flex: 1;
    min-width: 0;
}

.post-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    display: block;
}

.post-time {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
    border-radius: 9999px;
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

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

.post-excerpt {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    flex: 1;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-images img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-actions {
    display: flex;
    gap: 0.25rem;
}

.post-action {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.post-action:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
}

/* ==========================================
   商品卡片
   ========================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--bg-tertiary);
    display: block;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 0.375rem;
}

.product-original-price {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 0.375rem;
    font-weight: 400;
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-light);
    font-size: var(--font-size-xs);
}

.product-seller img {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    object-fit: cover;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.product-actions .btn {
    flex: 1;
    font-size: var(--font-size-xs);
    padding: 0.375rem 0.5rem;
}

/* ==========================================
   用户卡片
   ========================================== */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.user-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

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

.user-card img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    border: 3px solid var(--border-color);
    object-fit: cover;
}

.user-card h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.user-card p {
    color: var(--text-light);
    font-size: var(--font-size-xs);
    margin-bottom: 0.75rem;
}

.user-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

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

.user-stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    display: block;
}

.user-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

/* ==========================================
   页脚
   ========================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ==========================================
   模态框
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 2rem 1rem;
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 0 auto;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
    line-height: 1;
    transition: var(--transition);
}

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

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.modal-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* 社交登录 */
.social-divider {
    text-align: center;
    margin: 1.25rem 0;
    position: relative;
}

.social-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.social-divider span {
    background: var(--bg-primary);
    padding: 0 0.75rem;
    position: relative;
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.social-login-btns {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    transition: var(--transition);
}

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

.social-btn.wechat:hover {
    border-color: #07c160;
    color: #07c160;
}

.social-btn.qq:hover {
    border-color: #12b7f5;
    color: #12b7f5;
}

/* ==========================================
   工具类
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }
.p-4 { padding: var(--spacing-xl); }

.d-flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--spacing-sm); }
.gap-2 { gap: var(--spacing-md); }
.gap-3 { gap: var(--spacing-lg); }

.hidden { display: none !important; }
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

/* 通知 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    font-size: var(--font-size-sm);
    z-index: 3000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.notification.success { background-color: var(--success-color); }
.notification.error { background-color: var(--danger-color); }
.notification.warning { background-color: var(--warning-color); }
.notification.info { background-color: var(--info-color); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 价格筛选 */
.price-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-filter input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.price-filter input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-filter span {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* 论坛统计 */
.forum-stats p {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.forum-stats p:last-child {
    border-bottom: none;
}

.forum-stats span {
    font-weight: 600;
    color: var(--text-primary);
}

/* 作者信息 */
.author-info {
    text-align: center;
}

.author-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
}

.author-link:hover {
    background-color: var(--bg-tertiary);
}

.author-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 3px solid var(--border-color);
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-lg);
}

.author-bio {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* 图片适配 */
.user-profile img,
.profile-avatar,
.seller-avatar,
.comment-avatar,
.chat-avatar,
.main-image,
.thumbnail,
.order-image {
    object-fit: cover;
}

/* 购物车输入 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ==========================================
   页面特定样式
   ========================================== */

/* 论坛页面 */
.forum-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.forum-sidebar {
    position: sticky;
    top: 5rem;
}

.forum-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.forum-filter-btn {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: var(--transition);
}

.forum-filter-btn:hover,
.forum-filter-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.08);
}

/* 帖子详情 */
.post-detail {
    max-width: 800px;
    margin: 0 auto;
}

.post-detail-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
}

.post-detail-content .post-body {
    font-size: var(--font-size-base);
    line-height: 1.8;
    color: var(--text-primary);
    margin: 1.5rem 0;
    white-space: pre-wrap;
}

.post-detail-content .post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.post-detail-content .post-images img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* 评论区 */
.comments-section {
    margin-top: 2rem;
}

.comment-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.comment-author {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.comment-time {
    font-size: var(--font-size-xs);
    color: var(--text-light);
}

.comment-body {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 商品详情 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-gallery {
    position: sticky;
    top: 5rem;
}

.product-gallery .main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.product-detail-info {
    background: var(--bg-primary);
}

.product-detail-info .product-price {
    font-size: 1.75rem;
}

.product-detail-info .product-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* 个人中心 */
.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: 5rem;
}

.profile-avatar-wrapper {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.profile-avatar-wrapper img {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    border: 4px solid var(--primary-light);
    margin-bottom: 1rem;
    object-fit: cover;
}

/* 消息页面 */
.messages-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    height: calc(100vh - 3.5rem);
    overflow: hidden;
}

.messages-list {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    background: var(--bg-primary);
}

.message-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.message-item:hover,
.message-item.active {
    background: rgba(79, 70, 229, 0.04);
}

.message-chat {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* 结账页面 */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.checkout-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.checkout-summary {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
}

/* 管理后台 */
/* ==========================================
   管理后台 - 全新设计
   ========================================== */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
}

/* 侧边栏 */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .sidebar-logo {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.sidebar-header p {
    font-size: var(--font-size-xs);
    opacity: 0.5;
    margin-top: 0.125rem;
}

.sidebar-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.sidebar-nav-label {
    padding: 1rem 1.25rem 0.375rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.4;
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: all 0.2s;
    margin: 0.125rem 0.5rem;
    border-radius: 8px;
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-weight: 500;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: white;
    border-radius: 0 4px 4px 0;
}

.sidebar-nav a .nav-badge {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.sidebar-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: var(--font-size-xs);
    opacity: 0.5;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 3.5rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar h1 {
    font-size: 1.125rem;
    font-weight: 600;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-topbar-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.admin-topbar-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.admin-topbar-btn .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger-color);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.admin-content {
    padding: 1.5rem;
    flex: 1;
}

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: 16px;
    padding: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-banner h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.welcome-banner p {
    opacity: 0.85;
    font-size: 0.9375rem;
    position: relative;
    z-index: 1;
}

.welcome-banner .welcome-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.25rem;
    position: relative;
    z-index: 1;
}

.welcome-banner .welcome-stat {
    text-align: center;
}

.welcome-banner .welcome-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.welcome-banner .welcome-stat-label {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(20%, -20%);
}

.stat-card:nth-child(1)::after { background: var(--primary-color); }
.stat-card:nth-child(2)::after { background: var(--success-color); }
.stat-card:nth-child(3)::after { background: var(--warning-color); }
.stat-card:nth-child(4)::after { background: var(--danger-color); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.375rem;
    padding: 0.125rem 0.375rem;
    border-radius: 6px;
}

.stat-change.up {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.stat-change.down {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* 快捷操作 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.quick-action:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.quick-action-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.quick-action-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* 管理卡片 */
.admin-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

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

.admin-card-header h2 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-card-body {
    padding: 1.25rem;
}

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1.25rem;
    text-align: left;
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

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

.admin-table .user-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.admin-table .user-cell img {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    object-fit: cover;
}

/* 分页 */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.pagination-btns {
    display: flex;
    gap: 0.25rem;
}

.pagination-btns button {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.pagination-btns button:hover {
    background: var(--bg-secondary);
}

.pagination-btns button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btns button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 活动时间线 */
.activity-timeline {
    padding: 0;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

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

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

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.375rem;
    flex-shrink: 0;
}

.activity-dot.primary { background: var(--primary-color); }
.activity-dot.success { background: var(--success-color); }
.activity-dot.warning { background: var(--warning-color); }
.activity-dot.danger { background: var(--danger-color); }

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

.activity-text {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    line-height: 1.4;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* 图表区域 */
.chart-container {
    padding: 1.25rem;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.375rem;
    height: 120px;
    padding-top: 0.5rem;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s;
    position: relative;
    cursor: pointer;
    min-height: 4px;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
    transform-origin: bottom;
}

.chart-bar.primary { background: var(--primary-color); }
.chart-bar.success { background: var(--success-color); }
.chart-bar.warning { background: var(--warning-color); }

.chart-labels {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.chart-labels span {
    flex: 1;
    text-align: center;
    font-size: 0.625rem;
    color: var(--text-light);
}

.chart-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.chart-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

/* 管理按钮 */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid transparent;
}

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

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

.btn-admin-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-admin-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.btn-admin-danger:hover {
    background: #dc2626;
    color: white;
}

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

.btn-admin-success:hover {
    background: #059669;
    color: white;
}

/* 管理登录 */
.admin-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    position: relative;
    overflow: hidden;
}

.admin-login-body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    animation: loginBgRotate 30s linear infinite;
}

@keyframes loginBgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.admin-login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.admin-login-card .login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-card .login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin: 0 auto 1rem;
}

.admin-login-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.admin-login-card .subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* 静态页面 */
.static-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.static-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.static-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.static-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.static-page ul,
.static-page ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.static-page li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* 联系页面 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-info {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

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

/* 设置页面 */
.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* 管理后台设置网格 */
.settings-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
}

.settings-nav {
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 5rem;
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border-right: 2px solid transparent;
}

.settings-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.settings-nav a.active {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.06);
    border-right-color: var(--primary-color);
    font-weight: 500;
}

.settings-body {
    padding: 2rem;
}

.settings-group {
    margin-bottom: 2rem;
}

.settings-group h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.settings-group .desc {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-bottom: 1rem;
}

.settings-tab {
    animation: fadeIn 0.2s ease;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--bg-tertiary);
    gap: 1rem;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row > div {
    flex: 1;
    min-width: 0;
}

.settings-row label {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
    display: block;
    margin-bottom: 0.125rem;
}

.settings-row .help {
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin: 0;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    border-radius: 2.75rem;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 1.125rem;
    width: 1.125rem;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(1.25rem);
}

/* 管理后台表单 */
.admin-form .form-group {
    margin-bottom: 1.25rem;
}

.admin-form label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    box-sizing: border-box;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.settings-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
}

.settings-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* 订单/购物车 */
.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    background: var(--bg-primary);
}

.order-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.order-info {
    flex: 1;
    min-width: 0;
}

.order-title {
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: 0.25rem;
}

.order-price {
    color: var(--danger-color);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* 标签/徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: 9999px;
}

.badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* 状态指示 */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--success-color); }
.status-dot.offline { background: var(--text-light); }
.status-dot.busy { background: var(--warning-color); }
