/* ============================================================
   PlayCun 商城系统 - 全局样式 (暗色主题 + 霓虹 + 玻璃拟态)
   ============================================================ */

/* 基础变量 */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --bg-glass-hover: rgba(255, 255, 255, 0.12);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(139, 92, 246, 0.3);

    --text-primary: #e4e4f0;
    --text-secondary: #9090b0;
    --text-muted: #606080;

    --neon-purple: #8b5cf6;
    --neon-blue: #3b82f6;
    --neon-cyan: #06b6d4;
    --neon-pink: #ec4899;
    --neon-green: #10b981;
    --neon-red: #ef4444;
    --neon-orange: #f59e0b;

    --gradient-main: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
    --gradient-pink: linear-gradient(135deg, #ec4899, #8b5cf6);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);

    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

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

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* 动态粒子背景 */
.particles-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        var(--bg-primary);
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
    background: var(--bg-glass);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--neon-pink);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

/* ============================================================
   移动端导航栏（防止溢出/错位）
   ============================================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0 0.75rem;
        height: auto;
        min-height: 56px;
        gap: 0.75rem;
    }
    .navbar-brand {
        font-size: 1.2rem;
        letter-spacing: 1px;
        flex: 0 0 auto;
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .navbar-nav {
        flex: 1 1 auto;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
        padding: 10px 0;
        justify-content: flex-start;
        scrollbar-width: none;
    }
.navbar-nav::-webkit-scrollbar { display: none; }
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }
    .nav-badge { top: 0; right: 0; }
}

@media (max-width: 480px) {
    .navbar-brand { max-width: 34vw; }
    .nav-link { padding: 8px 10px; }
}

/* ============================================================
   首页公告横幅
   ============================================================ */
.announcement-banner {
    width: 100%;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
}

.announcement-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .announcement-content { padding: 10px 1rem; font-size: 0.85rem; }
}

/* ============================================================
   玻璃拟态卡片
   ============================================================ */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}
.glass-card:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* ============================================================
   商品卡片 (3D 倾斜效果)
   ============================================================ */
.product-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    perspective: 1000px;
}
.product-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
    border-color: var(--border-glow);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2), var(--shadow-glow);
}

.product-card .product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-card .product-info {
    padding: 1rem;
}

.product-card .product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-card .product-price .unit {
    font-size: 0.8rem;
}

.out-of-stock {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================
   按钮系统
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glow);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
}
.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    color: var(--neon-purple);
}

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

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

.form-control {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--neon-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(255, 255, 255, 0.08);
}
.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    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='%239090b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-error {
    color: var(--neon-red);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* ============================================================
   布局系统
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    overflow: visible;
}

.page-content {
    padding: 2rem 0;
    min-height: calc(100vh - 64px - 80px);
    overflow: visible;
}

.grid {
    display: grid;
    gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 0 1rem; }
    .page-content { padding: 1.25rem 0; }
    .page-title { font-size: 1.5rem; margin-bottom: 1rem; }
    .section-title { font-size: 1.15rem; }
}
@media (max-width: 480px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 0 0.85rem; }
}

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ============================================================
   页面标题
   ============================================================ */
.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 12px;
    border-left: 3px solid var(--neon-purple);
}

/* ============================================================
   消息提示
   ============================================================ */
.messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

@media (max-width: 768px) {
    .messages {
        left: 12px;
        right: 12px;
        top: 72px;
        max-width: none;
    }
}

.alert {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
    cursor: pointer;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--neon-green);
}
.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--neon-red);
}
.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--neon-orange);
}
.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--neon-blue);
}

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

/* ============================================================
   分页
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    margin-top: 2rem;
    list-style: none;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: var(--transition);
}

.pagination a {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
}
.pagination a:hover {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

.pagination .current {
    background: var(--gradient-main);
    color: #fff;
    font-weight: 600;
}

/* ============================================================
   轮播图
   ============================================================ */
.carousel-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.carousel-overlay h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carousel-overlay p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
}
.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--neon-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

@media (max-width: 768px) {
    .carousel-slide img { height: 260px; }
    .carousel-overlay { padding: 1.25rem; }
    .carousel-overlay h2 { font-size: 1.1rem; }
    .carousel-btn { width: 40px; height: 40px; }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

@media (max-width: 480px) {
    .carousel-slide img { height: 210px; }
}

/* ============================================================
   表格
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

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

th, td {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 480px) {
    th, td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

th {
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

tr:hover td {
    background: rgba(255,255,255,0.03);
}

/* ============================================================
   状态标签
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: rgba(245,158,11,0.15); color: var(--neon-orange); }
.badge-paid { background: rgba(59,130,246,0.15); color: var(--neon-blue); }
.badge-shipped { background: rgba(139,92,246,0.15); color: var(--neon-purple); }
.badge-completed { background: rgba(16,185,129,0.15); color: var(--neon-green); }
.badge-cancelled { background: rgba(239,68,68,0.15); color: var(--neon-red); }

/* ============================================================
   客服悬浮按钮
   ============================================================ */
.cs-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-main);
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    z-index: 999;
    transition: var(--transition);
    border: none;
    animation: pulse-glow 2s infinite;
}

@media (max-width: 768px) {
    .cs-float-btn {
        right: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
}
.cs-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.cs-float-btn .unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: var(--neon-red);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.6), 0 0 60px rgba(139, 92, 246, 0.2); }
}

/* ============================================================
   客服聊天窗口
   ============================================================ */
.cs-chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: rgba(18, 18, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    z-index: 998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.cs-chat-window.open { display: flex; }

@media (max-width: 768px) {
    .cs-chat-window {
        right: 16px;
        bottom: 84px;
        width: min(420px, calc(100vw - 32px));
        height: min(540px, calc(100vh - 140px));
    }
}

@media (max-width: 480px) {
    .cs-chat-window {
        right: 12px;
        bottom: 78px;
        width: calc(100vw - 24px);
        height: calc(100vh - 140px);
    }
}

.cs-chat-header {
    padding: 16px;
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-chat-header h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.cs-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.cs-status-dot.online { background: var(--neon-green); box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.cs-status-dot.offline { background: var(--text-muted); }

.cs-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cs-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.5;
    animation: fadeInUp 0.3s ease;
}

.cs-message.user {
    align-self: flex-end;
    background: var(--gradient-main);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.cs-message.admin {
    align-self: flex-start;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-bottom-left-radius: 4px;
}

.cs-chat-footer {
    padding: 12px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    gap: 8px;
}

.cs-chat-footer input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}
.cs-chat-footer input:focus {
    border-color: var(--neon-purple);
}

.cs-chat-footer button {
    padding: 10px 20px;
    background: var(--gradient-main);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   滚动入场动画
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   骨架屏
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-glass) 25%, rgba(255,255,255,0.08) 50%, var(--bg-glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background: rgba(10, 10, 26, 0.9);
    border-top: 1px solid var(--border-glass);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================================
   登录/注册页 全屏背景
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
}

.auth-card h1 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.captcha-group .form-control {
    flex: 1;
}
.captcha-group img {
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--border-glass);
}

/* ============================================================
   钱包页面
   ============================================================ */
.wallet-balance {
    text-align: center;
    padding: 2rem;
}

.wallet-balance .amount {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wallet-balance .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============================================================
   筛选栏
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}

.filter-bar .form-control {
    max-width: 200px;
}

@media (max-width: 768px) {
    .filter-bar {
        padding: 0.9rem;
        gap: 0.6rem;
    }
    .filter-bar .form-control {
        max-width: none;
        min-width: 0;
        flex: 1 1 140px;
    }
    .filter-bar .btn {
        flex: 1 1 120px;
    }
}

@media (max-width: 480px) {
    .filter-bar .form-control,
    .filter-bar .btn {
        flex: 1 1 100%;
    }
}

/* ============================================================
   空状态
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

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

.empty-state p {
    font-size: 1rem;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ============================================================
   工具类
   ============================================================ */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.flex-between { justify-content: space-between; }
.flex-end { justify-content: flex-end; }
.flex-center { justify-content: center; }
.align-start { align-items: flex-start; }
.align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-xs { gap: 0.3rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.ml-1 { margin-left: 0.5rem; }
.w-100 { width: 100%; }
.no-margin { margin: 0; }
.text-right { text-align: right; }
.text-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.text-muted-sm {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.required-star { color: var(--neon-red); }
.link-block {
    display: block;
    text-decoration: none;
    color: inherit;
}
.attachment-img {
    max-width: 300px;
    border-radius: var(--radius-sm);
}
.attachment-img-sm {
    max-width: 200px;
    border-radius: var(--radius-sm);
}
.no-img-placeholder {
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    aspect-ratio: 1;
    font-size: 1.2rem;
}

/* ============================================================
   工单 - 前台
   ============================================================ */
.ticket-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}
.ticket-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}
.ticket-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.ticket-content-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}
.reply-admin {
    border-left: 3px solid var(--neon-purple);
}
.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.ticket-form-card {
    max-width: 700px;
    margin: 0 auto;
}
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}
.ticket-empty {
    padding: 2rem;
}
.ticket-link {
    text-decoration: none;
    color: inherit;
}
