/* ============================================
   chat.css - 乌贼聊天室完整样式
   包含：所有页面的公共样式、登录/注册、
   聊天、首页、购买页等
   ============================================ */

/* ==================== 1. 全局基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --bs-link-color: #0d6efd;
    --bs-link-hover-color: #0a58ca;
    --footer-primary: #0d6efd;
    --footer-secondary: #0b5ed7;
    --footer-accent: #0a58ca;
    --footer-gradient-start: rgba(13, 110, 253, 0.95);
    --footer-gradient-middle: rgba(11, 94, 215, 0.97);
    --footer-gradient-end: rgba(10, 88, 202, 0.95);
    --footer-glow: rgba(13, 110, 253, 0.3);
    --footer-text: #ffffff;
}

/* ==================== 2. 页面基础背景 ==================== */
/* 默认页面背景（登录/注册/首页/销售页） */
body {
    background: linear-gradient(145deg, #f8faff 0%, #f0f5ff 100%);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.7;
    padding-bottom: 80px;
}

/* 聊天页面背景（覆盖默认背景） */
body.chat-page {
    background-image: url('../images/wz7.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #0a1628;
}

/* ==================== 3. 统一滚动条 ==================== */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.3);
}

/* ==================== 4. 统一导航栏 ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 110, 253, 0.08);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
}
.navbar .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d6efd;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-brand:hover {
    color: #0b5ed7;
}
.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}
.nav-links a {
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}
.nav-links a:hover {
    color: #0d6efd;
}
.nav-links .btn-nav {
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    color: #fff;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
    border: none;
}
.nav-links .btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    color: #fff;
}

/* ===== 聊天页面导航栏覆盖（深色背景 + 白色文字） ===== */
body.chat-page .navbar {
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(100, 200, 255, 0.06);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
body.chat-page .navbar .navbar-brand {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
body.chat-page .navbar .navbar-brand:hover {
    color: #7dd3fc !important;
}

/* 导航链接 - 白色清晰可见 */
body.chat-page .navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
body.chat-page .navbar .nav-link:hover {
    color: #7dd3fc !important;
}

/* 导航栏中的欢迎文字和登出链接 */
body.chat-page .navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}
body.chat-page .navbar .navbar-nav .nav-link:hover {
    color: #7dd3fc !important;
}

/* 导航栏汉堡菜单按钮（移动端） */
body.chat-page .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}
body.chat-page .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.chat-page .nav-links a {
    color: rgba(255, 255, 255, 0.9) !important;
}
body.chat-page .nav-links a:hover {
    color: #7dd3fc !important;
}
body.chat-page .nav-links .btn-nav {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #fff;
}
body.chat-page .nav-links .btn-nav:hover {
    background: linear-gradient(135deg, #0ea5e9, #0c8fd6);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
    color: #fff;
}

/* ==================== 5. 统一 LOGO 样式 ==================== */
.logo-wrapper {
    display: inline-block;
    background: white;
    border-left: 6px solid #0d6efd;
    border-radius: 1rem !important;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.03);
    padding: 0.5rem !important;
}
.logo-wrapper img {
    width: 210px;
    height: auto;
    border-radius: 0.5rem !important;
    display: block;
}

/* ==================== 6. 统一徽章样式 ==================== */
.badge-blue {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    padding: 0.35rem 0.85rem;
    border-radius: 30px;
    font-weight: 500;
    display: inline-block;
}

/* ==================== 7. Hero 区域（首页） ==================== */
.hero {
    padding: 140px 20px 80px;
    text-align: center;
    background: linear-gradient(180deg, #f8faff 0%, #f0f5ff 100%);
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #0d6efd, #0ea5e9, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.1rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto 32px;
}
.hero-badge {
    display: inline-block;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.15);
    color: #0d6efd;
    padding: 6px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

/* ==================== 8. 统一卡片样式 ==================== */
/* 登录/注册卡片 */
.login-card,
.register-card {
    border: none;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-color: white;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}
.login-card:hover,
.register-card:hover {
    box-shadow: 0 1rem 2rem rgba(13, 110, 253, 0.18);
}
.login-card-header,
.register-card-header {
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    border-bottom: none;
    padding: 1.2rem 1.5rem;
    text-align: center;
}
.login-card-header h3,
.register-card-header h3 {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    margin-bottom: 0;
    font-size: 1.5rem;
}
.login-card-body,
.register-card-body {
    padding: 2rem;
}

/* 版本卡片（首页/销售页） */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.pricing-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 28px 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.03);
}
.pricing-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.08);
}
.pricing-card.featured {
    border-color: rgba(13, 110, 253, 0.3);
    background: rgba(13, 110, 253, 0.02);
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.06);
}
.pricing-card.featured::before {
    content: '⭐ 推荐';
    position: absolute;
    top: 14px;
    right: -26px;
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    color: #fff;
    font-size: 10px;
    padding: 3px 30px;
    transform: rotate(45deg);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.pricing-card .version {
    font-size: 11px;
    color: #0d6efd;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.pricing-card h3 {
    font-size: 1.15rem;
    margin: 6px 0 10px;
    color: #0a1628;
}
.pricing-card .price {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 8px 0;
    color: #0a1628;
}
.pricing-card .price small {
    font-size: 12px;
    font-weight: 400;
    color: #94a3b8;
}
.pricing-card .features {
    list-style: none;
    margin: 14px 0;
    flex: 1;
    padding: 0;
}
.pricing-card .features li {
    padding: 4px 0;
    color: #475569;
    font-size: 12px;
}
.pricing-card .features li::before {
    content: '✓ ';
    color: #0d6efd;
    font-weight: 700;
}
.pricing-card .btn-card {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
    margin-top: auto;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.pricing-card .btn-card:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-2px);
}
.btn-card-accent {
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.2) !important;
    color: #0d6efd !important;
}
.btn-card-accent:hover {
    background: rgba(13, 110, 253, 0.12) !important;
}

/* ==================== 9. 统一表单样式 ==================== */
.form-control {
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    transition: all 0.2s;
}
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.form-label {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
}
.input-group-text {
    background-color: white;
    border-right: 0;
}
.input-group .form-control {
    border-left: 0;
}

/* ==================== 10. 统一按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: 0.3s;
    margin: 0 8px;
    border: none;
}
.btn-primary {
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    color: #fff;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(13, 110, 253, 0.4);
    color: #fff;
}
.btn-outline {
    border: 2px solid #e2e8f0;
    color: #475569;
    background: transparent;
}
.btn-outline:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: translateY(-2px);
}
.btn-success {
    background: linear-gradient(145deg, #198754, #157347);
    border: none;
    border-radius: 50px !important;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s;
    color: white;
    width: 100%;
}
.btn-success:hover {
    background: linear-gradient(145deg, #157347, #146c43);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(25, 135, 84, 0.3);
}

/* ==================== 11. 统一警告框样式 ==================== */
.alert {
    border-radius: 1rem;
    border-left-width: 6px;
    border-left-color: #0d6efd;
    background: white;
    box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.08);
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}
.alert-danger {
    border-left-color: #dc3545;
    background: #fff5f5;
}
.alert-success {
    border-left-color: #198754;
    background: #f0fff4;
}

/* ==================== 12. 统一分割线 ==================== */
hr {
    opacity: 0.5;
    background: linear-gradient(90deg, transparent, #0d6efd, transparent);
    height: 2px;
    border: none;
    margin: 2rem 0;
}

/* ==================== 13. 统一容器和间距 ==================== */
.container {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
.mt-2 {
    margin-top: 0.5rem !important;
}
.mb-5 {
    margin-bottom: 3rem !important;
}

/* 聊天页面容器 - 增加顶部间距，低于导航栏 */
body.chat-page .container {
    padding-top: 80px !important;
}

/* ==================== 14. 统一链接样式 ==================== */
.register-link,
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.register-link a,
.login-link a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}
.register-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* ==================== 15. 统一文本样式 ==================== */
.text-secondary-emphasis {
    color: #2c3e50 !important;
}
.password-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}
.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    word-break: break-all;
}

/* ==================== 16. 通用 Section ==================== */
.section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 20px;
}
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0a1628;
}
.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 48px;
    font-size: 15px;
}

/* ==================== 17. 核心功能网格 ==================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.feature-item {
    text-align: center;
    padding: 20px 16px;
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.feature-item:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 110, 253, 0.15);
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.06);
}
.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}
.feature-item h4 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #0a1628;
}
.feature-item p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* ==================== 18. 版本对比表格 ==================== */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.03);
}
.compare-table th,
.compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}
.compare-table th {
    background: linear-gradient(145deg, #f8faff, #f0f5ff);
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}
.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    color: #475569;
    font-weight: 500;
}
.compare-table tr:hover td {
    background: #fafdff;
}
.check {
    color: #0d6efd;
    font-weight: 700;
}
.cross {
    color: #cbd5e1;
}

/* ==================== 19. 演示链接卡片 ==================== */
.demo-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.demo-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: 0.3s;
    text-decoration: none;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.demo-card:hover {
    transform: translateY(-4px);
    border-color: rgba(13, 110, 253, 0.2);
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.08);
}
.demo-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.demo-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
    color: #0a1628;
}
.demo-info span {
    color: #94a3b8;
    font-size: 12px;
}

/* ==================== 20. 聊天容器 ==================== */
#chat-container {
    height: 60vh;
    overflow-y: auto;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: rgba(248, 249, 250, 0.9);
    border-radius: 0.375rem;
    border: 1px solid rgba(222, 226, 230, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    scroll-behavior: smooth;
}
/* 聊天页面容器背景（覆盖默认） */
body.chat-page #chat-container {
    background-color: rgba(248, 249, 250, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(222, 226, 230, 0.3);
}

/* ==================== 21. 外框容器 ==================== */
.zjwk {
    margin: 10px;
    background-color: white;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    text-align: left;
    margin-left: 10px;
    margin-top: 10px;
    margin-right: 10px;
    height: auto;
}
body.chat-page .zjwk {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

/* ==================== 22. 消息样式 ==================== */
.message-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    word-wrap: break-word;
}
.message-item .username {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.message-item .message-content {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    font-size: 1rem;
    line-height: 1.4;
    word-wrap: break-word;
    max-width: 100%;
}
.message-item.user-left {
    align-self: flex-start;
}
.message-item.user-right {
    align-self: flex-end;
}
.message-item.user-right .username,
.message-item.user-right .message-content,
.message-item.user-right .timestamp {
    text-align: right;
}
.message-item.user-right .message-content {
    background-color: #c4e3ff;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 18px;
}
.message-item.user-left .message-content {
    background-color: #e9ecef;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 18px;
}
.message-item .timestamp {
    font-size: 0.75rem;
    color: #adb5bd;
    margin-top: 0.25rem;
}

/* ==================== 23. 七彩色系：21 种用户颜色 ==================== */
/* 红系 */
.message-item.user-red1 .message-content { background-color: #f8d7da; }
.message-item.user-red2 .message-content { background-color: #f1aeb5; }
.message-item.user-red3 .message-content { background-color: #e68a99; }
/* 橙系 */
.message-item.user-orange1 .message-content { background-color: #ffe0b2; }
.message-item.user-orange2 .message-content { background-color: #ffcc80; }
.message-item.user-orange3 .message-content { background-color: #ffb74d; }
/* 黄系 */
.message-item.user-yellow1 .message-content { background-color: #fff9c4; }
.message-item.user-yellow2 .message-content { background-color: #fff59d; }
.message-item.user-yellow3 .message-content { background-color: #ffed6f; }
/* 绿系 */
.message-item.user-green1 .message-content { background-color: #dcedc8; }
.message-item.user-green2 .message-content { background-color: #c5e1a5; }
.message-item.user-green3 .message-content { background-color: #aed581; }
/* 青系 */
.message-item.user-cyan1 .message-content { background-color: #b2dfdb; }
.message-item.user-cyan2 .message-content { background-color: #80cbc4; }
.message-item.user-cyan3 .message-content { background-color: #4db6ac; }
/* 蓝系 */
.message-item.user-blue1 .message-content { background-color: #bbdefb; }
.message-item.user-blue2 .message-content { background-color: #90caf9; }
.message-item.user-blue3 .message-content { background-color: #64b5f6; }
/* 紫系 */
.message-item.user-purple1 .message-content { background-color: #e1bee7; }
.message-item.user-purple2 .message-content { background-color: #ba68c8; color: #fff; }
.message-item.user-purple3 .message-content { background-color: #9c27b0; color: #fff; }

/* ==================== 24. 文件消息样式 ==================== */
.file-message {
    margin: 5px 0;
    padding: 8px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    display: inline-block;
    max-width: 300px;
}
.file-message .file-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.95em;
}
.file-message .file-link:hover {
    text-decoration: underline;
}

/* ==================== 25. 通知 Toast ==================== */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.notification-toast span { font-size: 14px; }
.notification-toast i { font-size: 18px; }

/* ==================== 26. 管理员控制区 ==================== */
.admin-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.sound-control {
    background: #6c757d;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 16px;
}
.sound-control:hover { background: #5a6268; }
.sound-control.off { background: #495057; opacity: 0.8; }
.btn-clear { margin: 0; }
.sound-status { font-size: 14px; }

/* ==================== 27. 统一底部导航（蓝色系） ==================== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg,
            var(--footer-gradient-start) 0%,
            var(--footer-gradient-middle) 50%,
            var(--footer-gradient-end) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 12px 10px 8px;
    z-index: 1000;
    box-shadow:
        0 -10px 30px rgba(13, 110, 253, 0.25),
        0 -5px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 0 15px rgba(134, 183, 254, 0.2);
    animation: slideUp 0.5s ease-out;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%,
            rgba(13, 110, 253, 0.25) 0%,
            transparent 60%),
        radial-gradient(circle at 80% 20%,
            rgba(11, 94, 215, 0.25) 0%,
            transparent 60%);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    animation: blueGlow 3s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0.5; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes blueGlow {
    0% { opacity: 0.3; filter: blur(4px); }
    100% { opacity: 0.6; filter: blur(10px); }
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style-type: none;
    padding: 0 5px;
    margin: 0;
    position: relative;
    gap: 2px;
}
.footer-item {
    flex: 1;
    text-align: center;
    position: relative;
    margin: 0 2px;
    transition: all 0.3s ease;
}
.footer-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--footer-text);
    padding: 8px 4px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    min-height: 60px;
    max-width: 80px;
    margin: 0 auto;
    width: 100%;
}
.footer-icon {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    text-shadow:
        0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 8px rgba(255, 255, 255, 0.3);
    z-index: 2;
    position: relative;
    color: var(--footer-text);
    line-height: 1;
}
.footer-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--footer-text);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow:
        1px 1px 2px rgba(0, 0, 0, 0.2),
        0 0 6px rgba(255, 255, 255, 0.15);
    z-index: 2;
    position: relative;
    line-height: 1.2;
    margin-top: 2px;
}
.footer-item a:hover {
    transform: translateY(-6px) scale(1.06);
    background: rgba(255, 255, 255, 0.2);
    box-shadow:
        0 10px 25px rgba(13, 110, 253, 0.35),
        0 6px 18px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 20px rgba(13, 110, 253, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--footer-text);
}
.footer-item a:hover .footer-icon {
    transform: scale(1.15) rotate(3deg);
    filter: drop-shadow(0 4px 6px rgba(13, 110, 253, 0.4));
    text-shadow:
        0 0 12px rgba(255, 255, 255, 0.5),
        0 2px 8px rgba(13, 110, 253, 0.4);
}
.footer-item a:hover .footer-text {
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(13, 110, 253, 0.3);
    letter-spacing: 1px;
}
.footer-item.active a {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 5px 15px rgba(13, 110, 253, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.footer-item.active .footer-icon {
    transform: scale(1.08);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}
.footer-item.active .footer-text {
    opacity: 1;
}

/* ==================== 28. 响应式设计 ==================== */

/* 大屏 (≥1200px) */
@media (min-width: 1200px) {
    .footer-item a { max-width: 90px; min-height: 64px; }
    .footer-icon { font-size: 24px; }
    .footer-text { font-size: 12px; }
}

/* 平板 (≤991px) */
@media (max-width: 991px) {
    .footer {
        border-top-left-radius: 22px;
        border-top-right-radius: 22px;
        padding: 10px 8px 6px;
        backdrop-filter: blur(12px);
    }
    .footer-item a { min-height: 56px; max-width: 70px; }
    .footer-icon { font-size: 20px; }
    .footer-text { font-size: 10px; letter-spacing: 0.3px; }
}

/* 手机 (≤768px) */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .nav-links { display: none; }
    .pricing-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .demo-links { grid-template-columns: 1fr; }
    .compare-table { font-size: 11px; }
    .compare-table th,
    .compare-table td { padding: 8px 6px; }
    .logo-wrapper img { width: 160px; }
    .hero { padding: 120px 20px 60px; }
    .login-card-header h3,
    .register-card-header h3 { font-size: 1.2rem; }
    .login-card-body,
    .register-card-body { padding: 1.5rem; }
    #chat-container { height: 50vh; padding: 0.75rem; }
    /* 聊天页面手机容器间距 */
    body.chat-page .container {
        padding-top: 75px !important;
    }
}

/* 手机 (≤576px) */
@media (max-width: 576px) {
    .footer {
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
        padding: 8px 5px 4px;
        backdrop-filter: blur(10px);
    }
    .footer-item a {
        min-height: 52px;
        max-width: 58px;
        padding: 6px 2px;
        border-radius: 14px;
    }
    .footer-icon { font-size: 18px; margin-bottom: 2px; }
    .footer-text {
        font-size: 9px;
        letter-spacing: 0.2px;
        white-space: normal;
        line-height: 1.1;
    }
    .footer-item a:hover { transform: translateY(-4px) scale(1.04); }
    #chat-container { height: 45vh; padding: 0.5rem; }
    .message-item { max-width: 90%; }
    .message-item .message-content {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    .container {
        padding-top: 60px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .admin-controls { gap: 10px; }
    .sound-control { padding: 6px 14px; font-size: 14px; }
    .btn-clear { font-size: 14px; padding: 6px 14px; }
    /* 聊天页面手机容器间距 */
    body.chat-page .container {
        padding-top: 70px !important;
    }
}

/* 超小屏 (≤480px) */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.4rem; }
    .btn { padding: 10px 20px; font-size: 13px; margin: 4px; }
    .pricing-card { padding: 20px 16px; }
    .pricing-card .price { font-size: 1.5rem; }
    .logo-wrapper img { width: 140px; }
    body.chat-page .container {
        padding-top: 65px !important;
    }
}

/* 超小屏 (≤375px) */
@media (max-width: 375px) {
    .footer-item a { min-height: 48px; max-width: 52px; }
    .footer-icon { font-size: 16px; }
    .footer-text { font-size: 8px; }
    body.chat-page .container {
        padding-top: 60px !important;
    }
}

/* ==================== 29. 兼容性 ==================== */

/* 兼容 iOS 安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .footer { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
    .footer { padding-bottom: calc(8px + constant(safe-area-inset-bottom)); }
}

/* 优化触摸区域 */
@media (hover: none) and (pointer: coarse) {
    .footer-item a { min-height: 58px; padding: 10px 4px; }
    .footer-item a:active {
        transform: translateY(-3px) scale(1.02);
        background: rgba(255, 255, 255, 0.18);
    }
}

/* ==================== 30. 销售页面特有样式 ==================== */
/* 版本卡片颜色区分 */
.pricing-card.free {
    border-color: rgba(16, 185, 129, 0.15);
}
.pricing-card.free:hover {
    border-color: rgba(16, 185, 129, 0.3);
}
.pricing-card.free .card-badge {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}
.pricing-card.free .btn-card {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}
.pricing-card.free .btn-card:hover {
    background: #059669;
    border-color: #059669;
}

.pricing-card.standard {
    border-color: rgba(13, 110, 253, 0.12);
}
.pricing-card.standard:hover {
    border-color: rgba(13, 110, 253, 0.25);
}
.pricing-card.standard .card-badge {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}
.pricing-card.standard .btn-card {
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    color: #fff;
    border-color: #0d6efd;
}

.pricing-card.marketing {
    border-color: rgba(251, 191, 36, 0.15);
}
.pricing-card.marketing:hover {
    border-color: rgba(251, 191, 36, 0.3);
}
.pricing-card.marketing .card-badge {
    background: rgba(251, 191, 36, 0.12);
    color: #d97706;
}
.pricing-card.marketing .btn-card {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    color: #fff;
    border-color: #f59e0b;
}

.pricing-card.custom {
    border-color: rgba(129, 140, 248, 0.15);
}
.pricing-card.custom:hover {
    border-color: rgba(129, 140, 248, 0.3);
}
.pricing-card.custom .card-badge {
    background: rgba(129, 140, 248, 0.12);
    color: #6366f1;
}
.pricing-card.custom .btn-card {
    background: linear-gradient(145deg, #818cf8, #6366f1);
    color: #fff;
    border-color: #818cf8;
}

.pricing-card .card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.55rem;
    padding: 2px 12px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pricing-card .card-icon {
    font-size: 2.2rem;
    margin-bottom: 4px;
}
.pricing-card .card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1628;
}
.pricing-card .card-price {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 6px 0 2px;
}
.pricing-card .card-price .free {
    color: #10b981;
}
.pricing-card .card-price small {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 400;
}
.pricing-card .card-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.6;
}
.pricing-card .card-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    text-align: left;
    flex: 1;
}
.pricing-card .card-features li {
    font-size: 0.78rem;
    color: #475569;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pricing-card .card-features li .check {
    color: #0d6efd;
    font-weight: 700;
}
.pricing-card .btn-card {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 28px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
}
.pricing-card .btn-card:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    transform: scale(1.04);
}

.popular-tag {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    padding: 2px 16px;
    border-radius: 30px;
    background: linear-gradient(135deg, #0d6efd, #0ea5e9);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 安全流程 */
.security-flow {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.security-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
    font-size: 0.9rem;
    color: #475569;
}
.security-step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #0d6efd;
    flex-shrink: 0;
}
.security-step .arrow {
    color: #cbd5e1;
    font-size: 1rem;
}

/* 技术标签 */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}
.tech-tag {
    display: inline-block;
    padding: 2px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.tech-tag.primary {
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}
.tech-tag.success {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}
.tech-tag.warning {
    background: rgba(251, 191, 36, 0.06);
    border-color: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

/* 模板定制 */
.template-box {
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.1);
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    border-left: 3px solid #f59e0b;
    margin: 15px 0;
    background: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.template-box .title {
    font-weight: 700;
    color: #d97706;
    font-size: 1rem;
}
.template-box p {
    color: #64748b;
    margin: 4px 0 0;
    font-size: 0.9rem;
}
.template-box strong {
    color: #0d6efd;
}

/* 联系框 */
.contact-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 40px;
    margin-top: 16px;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #475569;
}
.contact-item .icon {
    font-size: 1.1rem;
}
.contact-item a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s;
}
.contact-item a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* 底部说明 */
.bottom-note {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.2rem 1.5rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.8;
    margin-top: 18px;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.02);
}
.bottom-note strong {
    color: #0a1628;
}

/* ==================== 31. 销售页面响应式 ==================== */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .demo-links {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .compare-table {
        font-size: 11px;
    }
    .compare-table th,
    .compare-table td {
        padding: 8px 6px;
    }
    .hero {
        padding: 110px 20px 40px;
    }
    .contact-box {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    .security-step {
        font-size: 0.82rem;
        flex-wrap: wrap;
    }
    .security-step .arrow {
        display: none;
    }
}
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    .pricing-card {
        padding: 1.2rem 0.8rem;
    }
    .pricing-card .card-price {
        font-size: 2rem;
    }
    .logo-wrapper img {
        width: 140px;
    }
}