/* ========================================
 * 蜘蛛池平台 - 全局样式
 * 黑红色金属质感主题
 * ======================================== */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-card-hi: #222;
    --bg-metal: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #0f0f0f 100%);
    --bg-metal-red: linear-gradient(135deg, #2a1515 0%, #1a0a0a 50%, #0f0505 100%);
    --red: #dc2626;
    --red-dark: #991b1b;
    --red-light: #ef4444;
    --red-glow: rgba(220, 38, 38, 0.4);
    --gold: #d4af37;
    --text: #e0e0e0;
    --text-muted: #888;
    --text-dim: #555;
    --border: #333;
    --border-light: #444;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-red: 0 4px 20px rgba(220, 38, 38, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--red-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--red); }

/* ============ 导航栏 ============ */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.navbar-inner {
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: bold;
    color: var(--text);
}

.navbar-logo .logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 0 15px var(--red-glow);
}

.navbar-logo .logo-text {
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-logo .logo-img {
    max-height: 42px;
    max-width: 160px;
    border-radius: 8px;
    object-fit: contain;
}

.auth-intro-logo {
    max-height: 56px;
    max-width: 200px;
    margin-bottom: 16px;
    border-radius: 8px;
    object-fit: contain;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--text);
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
    color: #fff;
    background: rgba(220, 38, 38, 0.15);
}

.navbar-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--red-glow);
}

.navbar-menu li a .icon {
    font-size: 18px;
}

.navbar-user-btn {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff !important;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 15px;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--red-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--red-glow);
}

/* ============ 轮播图 ============ */
.hero-slider {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    margin-top: 72px;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}

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

.hero-slide .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.hero-slide .slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.5) 50%, rgba(10, 10, 10, 0.3) 100%);
}

.hero-slide .slide-content {
    position: relative;
    z-index: 2;
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-slide .slide-title {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.hero-slide .slide-desc {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.8;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.hero-slide .slide-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: bold;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--red-glow);
}

.hero-slide .slide-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--red-glow);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: var(--red);
    box-shadow: 0 0 10px var(--red-glow);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--red);
    border-color: var(--red);
}

.slider-arrow.prev { left: 30px; }
.slider-arrow.next { right: 30px; }

/* ============ 通用 Section ============ */
.section {
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    padding: 80px 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--red);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--red-glow);
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 15px;
}

/* ============ 业务介绍 ============ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    transition: left 0.6s ease;
}

.service-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
}

.service-card:hover::before {
    left: 100%;
}

.service-card .service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--red-glow);
}

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

.service-card h3 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* ============ 价格表 ============ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.pricing-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
}

.pricing-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
}

.pricing-card .price-header {
    background: linear-gradient(135deg, var(--red-dark), #660000);
    padding: 24px;
}

.pricing-card .price-header h3 {
    color: #fff;
    font-size: 20px;
}

.pricing-card .price-body {
    padding: 36px 24px;
}

.pricing-card .price-amount {
    font-size: 42px;
    font-weight: bold;
    color: var(--red-light);
    margin-bottom: 8px;
}

.pricing-card .price-amount .unit {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-card .price-features {
    list-style: none;
    margin: 24px 0;
}

.pricing-card .price-features li {
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.pricing-card .price-features li:last-child {
    border-bottom: none;
}

.pricing-card .price-btn {
    display: block;
    padding: 12px;
    margin: 0 24px 24px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: bold;
    transition: var(--transition);
}

.pricing-card .price-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--red-glow);
}

/* ============ 用户案例 ============ */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

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

.case-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
}

.case-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: var(--transition);
}

.case-card:hover img {
    transform: scale(1.05);
}

.case-card .case-info {
    padding: 20px;
}

.case-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.case-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============ 技术文章 ============ */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    cursor: pointer;
}

.article-card:hover {
    border-color: var(--red);
    box-shadow: var(--shadow-red);
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-dim);
}

.article-card .article-tag {
    padding: 2px 10px;
    background: rgba(220, 38, 38, 0.15);
    color: var(--red-light);
    border-radius: 4px;
    font-size: 12px;
}

.article-card h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

/* ============ 页脚 ============ */
.footer {
    width: 100%;
    background: #050505;
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.footer .footer-inner {
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.footer p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer .footer-links {
    margin-top: 15px;
}

.footer .footer-links a {
    color: var(--text-muted);
    margin: 0 15px;
    font-size: 14px;
}

/* ============ 登录/注册页 ============ */
.auth-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 50%, #0a0a0a 100%);
    z-index: 1;
}

.auth-bg::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-bg::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-intro {
    position: relative;
    z-index: 2;
    width: 560px;
    max-width: 50%;
    padding: 0 60px 0 80px;
    color: var(--text);
}

.auth-intro-icon {
    font-size: 56px;
    margin-bottom: 16px;
    line-height: 1;
}

.auth-intro h1 {
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-intro-slogan {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.auth-intro-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--red), transparent);
    border-radius: 2px;
    margin-bottom: 32px;
}

.auth-intro-features {
    list-style: none;
    margin-bottom: 36px;
}

.auth-intro-features li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.auth-intro-features .feat-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-intro-features li > div {
    flex: 1;
    min-width: 0;
}

.auth-intro-features strong {
    display: block;
    color: #fff;
    font-size: 16px;
    margin-bottom: 4px;
}

.auth-intro-features p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-intro-stats {
    display: flex;
    gap: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-intro-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-intro-stats strong {
    font-size: 32px;
    color: var(--red-light);
    font-weight: bold;
}

.auth-intro-stats span {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.auth-box {
    position: relative;
    z-index: 2;
    width: 420px;
    margin-right: 80px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(220, 38, 38, 0.1);
    flex-shrink: 0;
}

.auth-box .auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-box .auth-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 20px var(--red-glow);
}

.auth-box .auth-logo h2 {
    color: #fff;
    font-size: 24px;
    margin-top: 16px;
}

.auth-box .auth-logo p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

.auth-box .auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.auth-box .auth-tabs .tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-box .auth-tabs .tab.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 2px 10px var(--red-glow);
}

.auth-box .form-group {
    margin-bottom: 20px;
}

.auth-box .form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-box .form-group input,
.auth-box .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 15px;
    transition: var(--transition);
}

.auth-box .form-group input:focus,
.auth-box .form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.2);
}

.auth-box .auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--red-glow);
}

.auth-box .auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--red-glow);
}

.auth-box .auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-box .auth-switch a {
    color: var(--red-light);
    cursor: pointer;
}

/* ============ 用户中心 ============ */
.user-center {
    min-height: 100vh;
    display: flex;
    padding-top: 0;
}

.user-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.user-sidebar .sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.user-sidebar .sidebar-header .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 10px;
}

.user-sidebar .sidebar-header h3 {
    color: #fff;
    font-size: 18px;
}

.user-sidebar .sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.user-sidebar .sidebar-menu li {
    margin-bottom: 4px;
}

.user-sidebar .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.user-sidebar .sidebar-menu li a:hover,
.user-sidebar .sidebar-menu li a.active {
    background: rgba(220, 38, 38, 0.15);
    color: #fff;
}

.user-sidebar .sidebar-menu li a.active {
    border-left: 3px solid var(--red);
}

.user-sidebar .sidebar-menu li a .icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.user-sidebar .sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.user-sidebar .sidebar-footer .logout-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.user-sidebar .sidebar-footer .logout-btn:hover {
    background: var(--red);
    color: #fff;
}

.user-main {
    flex: 1;
    margin-left: 240px;
    padding: 30px 40px;
    min-height: 100vh;
}

.user-main .page-title {
    font-size: 28px;
    color: #fff;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 用户信息卡片 */
.user-info-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info-card .user-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.user-info-card .user-details {
    flex: 1;
}

.user-info-card .user-details h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 6px;
}

.user-info-card .user-details .user-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.user-info-card .user-points {
    text-align: right;
}

.user-info-card .user-points .points-val {
    font-size: 32px;
    font-weight: bold;
    color: var(--red-light);
}

.user-info-card .user-points .points-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ============ TAB 标签 ============ */
.tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.tab-bar .tab-item {
    padding: 12px 24px;
    color: var(--text-muted);
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-bar .tab-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-bar .tab-item.active {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    box-shadow: 0 2px 10px var(--red-glow);
}

/* ============ 蜘蛛购买卡片 ============ */
.spider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.spider-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.spider-card:hover {
    border-color: var(--red);
    transform: translateY(-5px);
    box-shadow: var(--shadow-red);
}

.spider-card .spider-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.spider-card h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 8px;
}

.spider-card .spider-price {
    font-size: 36px;
    font-weight: bold;
    color: var(--red-light);
    margin-bottom: 4px;
}

.spider-card .spider-price .unit {
    font-size: 14px;
    color: var(--text-muted);
}

.spider-card .spider-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.spider-card .buy-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.spider-card .buy-btn:hover {
    box-shadow: 0 4px 15px var(--red-glow);
    transform: translateY(-2px);
}

/* ============ 弹窗 ============ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 800px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.modal-header h3 {
    color: #fff;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
}

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

.modal-body {
    padding: 24px;
}

.buy-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.buy-left, .buy-right {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.buy-left h4, .buy-right h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.buy-left .form-group {
    margin-bottom: 16px;
}

.buy-left .form-group label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}

.buy-left .form-group input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
}

.buy-left .form-group input:focus {
    outline: none;
    border-color: var(--red);
}

.buy-left .cost-display {
    margin-top: 20px;
    padding: 16px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: var(--radius-sm);
    text-align: center;
}

.buy-left .cost-display .cost-label {
    color: var(--text-muted);
    font-size: 14px;
}

.buy-left .cost-display .cost-amount {
    font-size: 28px;
    font-weight: bold;
    color: var(--red-light);
}

.buy-right textarea {
    width: 100%;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    padding: 12px;
    resize: vertical;
    font-family: monospace;
}

.buy-right textarea:focus {
    outline: none;
    border-color: var(--red);
}

.buy-right .tag-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.buy-right .tag-buttons button {
    flex: 1;
    padding: 10px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--red-light);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.buy-right .tag-buttons button:hover {
    background: var(--red);
    color: #fff;
}

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

.modal-footer .btn-cancel {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.modal-footer .btn-confirm {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 10px var(--red-glow);
}

/* ============ 数据表格 ============ */
.data-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

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

.data-table th {
    background: rgba(220, 38, 38, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.data-table .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.badge-warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-success { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-secondary { background: rgba(160, 160, 160, 0.15); color: #a0a0a0; }

.data-table .action-btn {
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--red-light);
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.data-table .action-btn:hover {
    background: var(--red);
    color: #fff;
}

/* ============ 充值页 ============ */
.recharge-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

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

.recharge-card label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.recharge-card input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 15px;
}

.recharge-card input:focus {
    outline: none;
    border-color: var(--red);
}

.recharge-card .btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.recharge-card .btn-primary {
    flex: 1;
    padding: 14px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--red-glow);
}

.recharge-card .btn-secondary {
    flex: 1;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.recharge-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ============ 推广页 ============ */
.promo-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
}

.promo-link-box {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.promo-link-box input {
    flex: 1;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--red-light);
    font-size: 14px;
    font-family: monospace;
}

.promo-link-box .copy-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--red-glow);
}

.promo-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.promo-stat-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
}

.promo-stat-item .stat-val {
    font-size: 28px;
    font-weight: bold;
    color: var(--red-light);
}

.promo-stat-item .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ 后台管理 ============ */
.admin-sidebar {
    width: 220px;
    background: #0d0d0d;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.admin-sidebar .sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.admin-sidebar .sidebar-header .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 10px;
}

.admin-sidebar .sidebar-header h3 {
    color: #fff;
    font-size: 16px;
}

.admin-sidebar .sidebar-header p {
    color: var(--text-dim);
    font-size: 12px;
    margin-top: 4px;
}

.admin-sidebar .sidebar-menu {
    list-style: none;
    padding: 16px 10px;
}

.admin-sidebar .sidebar-menu li {
    margin-bottom: 4px;
}

.admin-sidebar .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.admin-sidebar .sidebar-menu li a:hover,
.admin-sidebar .sidebar-menu li a.active {
    background: rgba(220, 38, 38, 0.15);
    color: #fff;
}

.admin-sidebar .sidebar-menu li a.active {
    border-left: 3px solid var(--red);
}

.admin-sidebar .sidebar-menu li a .icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.admin-sidebar .sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-sidebar .sidebar-footer .btn-home {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(220, 38, 38, 0.08);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    transition: var(--transition);
}

.admin-sidebar .sidebar-footer .btn-home:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #fff;
    border-color: var(--red);
}

.admin-sidebar .sidebar-footer .btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    transition: var(--transition);
}

.admin-sidebar .sidebar-footer .btn-logout:hover {
    background: var(--red);
    color: #fff;
}

.admin-main {
    margin-left: 220px;
    padding: 24px;
    min-height: 100vh;
}

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

.admin-topbar h1 {
    color: #fff;
    font-size: 24px;
}

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

/* 统计卡片 */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-metal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 32px;
    opacity: 0.2;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.stat-card .stat-trend {
    font-size: 13px;
    margin-top: 8px;
    color: #22c55e;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.15);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: monospace;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px var(--red-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--red-glow);
}

.btn-danger {
    padding: 8px 20px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red-light);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger:hover {
    background: var(--red);
    color: #fff;
}

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

/* 过滤栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 90px;
    right: 30px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success { background: rgba(34, 197, 94, 0.9); color: #fff; }
.toast-error { background: rgba(239, 68, 68, 0.9); color: #fff; }
.toast-warning { background: rgba(251, 191, 36, 0.9); color: #333; }

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

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

.empty-state p {
    font-size: 16px;
}

/* 管理后台登录页 */
.admin-login-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a, #1a0505, #0a0a0a);
}

.admin-login-box {
    width: 400px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(220, 38, 38, 0.1);
}

.admin-login-box .login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-box .login-logo .logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 20px var(--red-glow);
}

.admin-login-box .login-logo h2 {
    color: #fff;
    font-size: 22px;
    margin-top: 16px;
}

.admin-login-box .login-logo p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 6px;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar-inner { padding: 0 20px; }
    .navbar-menu { display: none; }
    .section { padding: 40px 20px; }
    .hero-slide .slide-content { padding: 0 30px; }
    .hero-slide .slide-title { font-size: 28px; }
    .hero-slide .slide-desc { font-size: 14px; }
    .user-sidebar { width: 200px; }
    .user-main { margin-left: 200px; padding: 20px; }
    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; }
    .buy-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .promo-stats { grid-template-columns: 1fr; }
}

/* 金属质感装饰 */
.metal-border {
    position: relative;
}

.metal-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

/* 动画 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 5px var(--red-glow); }
    50% { box-shadow: 0 0 20px var(--red-glow); }
}

.pulse-red {
    animation: pulseRed 2s infinite;
}

/* ========================================
 * 浮动在线咨询聊天组件
 * ======================================== */

/* 浮动按钮 */
#chat-float-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5), 0 0 0 0 rgba(220, 38, 38, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: chatPulse 2.5s infinite;
}

#chat-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.7);
}

#chat-float-btn.chat-active {
    animation: none;
    transform: scale(0.9);
    opacity: 0.7;
}

.chat-float-icon {
    font-size: 26px;
    line-height: 1;
}

.chat-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    padding: 0 5px;
    border: 2px solid #1a1a1a;
}

@keyframes chatPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5), 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5), 0 0 0 12px rgba(220, 38, 38, 0); }
}

/* 全屏透明遮罩层 */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chat-overlay.chat-open {
    opacity: 1;
    visibility: visible;
}

/* 聊天窗口 — 屏幕的70% */
.chat-window {
    width: 70vw;
    height: 70vh;
    max-width: 900px;
    max-height: 700px;
    min-width: 320px;
    min-height: 400px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(220, 38, 38, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.chat-overlay.chat-open .chat-window {
    transform: translateY(0) scale(1);
}

/* 聊天头部 */
.chat-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #2a1515, #1a0a0a);
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

.chat-window-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.chat-window-icon {
    font-size: 20px;
}

.chat-window-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.chat-window-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* 消息区域 */
.chat-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #121212;
    scroll-behavior: smooth;
}

.chat-window-body::-webkit-scrollbar {
    width: 6px;
}

.chat-window-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-window-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.chat-window-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 欢迎信息 */
.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.chat-welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.chat-welcome p {
    margin: 4px 0;
    font-size: 14px;
}

.chat-welcome-sub {
    color: #555 !important;
    font-size: 13px !important;
}

/* 消息气泡 */
.chat-msg {
    display: flex;
    margin-bottom: 16px;
    gap: 10px;
    animation: chatMsgIn 0.3s ease;
}

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

.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-msg-content {
    max-width: 75%;
    display: flex;
    flex-direction: column;
}

.chat-msg-name {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-time {
    font-size: 11px;
    color: #555;
    margin-top: 4px;
}

/* 访客消息（右侧） */
.chat-msg-visitor {
    flex-direction: row-reverse;
}

.chat-msg-visitor .chat-msg-avatar {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.chat-msg-visitor .chat-msg-content {
    align-items: flex-end;
}

.chat-msg-visitor .chat-msg-bubble {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* 客服消息（左侧） */
.chat-msg-admin .chat-msg-avatar {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid #444;
}

.chat-msg-admin .chat-msg-content {
    align-items: flex-start;
}

.chat-msg-admin .chat-msg-bubble {
    background: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #333;
    border-bottom-left-radius: 4px;
}

/* 输入区域 */
.chat-window-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    flex-shrink: 0;
}

.chat-window-input textarea {
    flex: 1;
    background: #0f0f0f;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 12px;
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chat-window-input textarea:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.15);
}

.chat-window-input textarea:disabled {
    opacity: 0.5;
}

.chat-send-btn {
    align-self: flex-end;
    padding: 8px 18px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.chat-send-btn:active {
    transform: translateY(0);
}

/* 底部提示 */
.chat-window-footer {
    padding: 8px 16px;
    background: #0f0f0f;
    border-top: 1px solid #222;
    text-align: center;
    font-size: 12px;
    color: #555;
    flex-shrink: 0;
}

/* 响应式适配 */
@media (max-width: 768px) {
    #chat-float-btn {
        right: 20px;
        bottom: 20px;
        width: 52px;
        height: 52px;
    }

    .chat-float-icon {
        font-size: 22px;
    }

    .chat-window {
        width: 92vw;
        height: 80vh;
        max-width: none;
        max-height: none;
        border-radius: 12px;
    }
}

/* ============ 公告弹窗 ============ */
.announcement-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.announcement-overlay.active {
    display: flex;
    opacity: 1;
}

.announcement-box {
    background: linear-gradient(145deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    width: 560px;
    max-width: 92%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(220, 38, 38, 0.15), 0 0 1px rgba(220, 38, 38, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.announcement-overlay.active .announcement-box {
    transform: scale(1) translateY(0);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.announcement-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 28px;
    right: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.announcement-type-badge {
    font-size: 15px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
}

.announcement-type-badge.type-1 {
    background: rgba(136, 136, 136, 0.15);
    color: var(--text);
    border: 1px solid rgba(136, 136, 136, 0.3);
}

.announcement-type-badge.type-2 {
    background: rgba(220, 38, 38, 0.15);
    color: var(--red-light);
    border: 1px solid rgba(220, 38, 38, 0.4);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.2);
}

.announcement-type-badge.type-3 {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.announcement-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: var(--transition);
}

.announcement-close:hover {
    color: var(--red);
    transform: rotate(90deg);
}

.announcement-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.announcement-title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.4;
}

.announcement-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--red), transparent);
    margin-bottom: 20px;
    border-radius: 1px;
}

.announcement-content {
    color: var(--text);
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.announcement-footer {
    padding: 16px 28px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.announcement-time {
    color: var(--text-dim);
    font-size: 13px;
}

.announcement-confirm-btn {
    padding: 8px 28px;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.announcement-confirm-btn:hover {
    box-shadow: 0 4px 15px var(--red-glow);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .announcement-box {
        width: 95%;
        max-height: 88vh;
    }

    .announcement-title {
        font-size: 20px;
    }

    .announcement-body {
        padding: 20px;
    }

    .announcement-footer {
        padding: 14px 20px;
    }
}

/* ============ 登录页响应式 ============ */
@media (max-width: 900px) {
    .auth-intro {
        display: none;
    }

    .auth-box {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .auth-box {
        width: 95%;
        padding: 36px 24px;
        margin: 0 auto;
    }
}
