/* ========================================
   哇哇智能健身房系统 - 公共基础样式
   所有页面共用的组件样式
   ======================================== */

/* ====== CSS 变量 ====== */
:root {
    --primary: #C8161D;
    --primary-dark: #A01218;
    --primary-light: #E83A40;
    --primary-bg: #FFF5F5;
    --secondary: #1A1A2E;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ====== CSS Reset ====== */
*, *::before, *::after {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1F2937;
    background-color: #fff;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: none;
}

img {
    border: none;
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin: 0;
    padding: 0;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ====== 工具类 ====== */
.cf::after,
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ====== 通用组件 ====== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.btn-large {
    padding: 16px 36px;
    font-size: 17px;
    border-radius: var(--radius-md);
}
.btn-white {
    background: #fff;
    color: var(--primary);
}
.btn-white:hover {
    background: #f9fafb;
    color: var(--primary-dark);
}
.btn-outline-white {
    border-color: #fff;
    color: #fff;
}
.btn-outline-white:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ====== 顶部公告栏 ====== */
.top-bar {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    height: 36px;
    line-height: 36px;
}
.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.welcome-text {
    letter-spacing: 0.5px;
}
.top-bar-right a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-left: 8px;
}
.top-bar-right a:hover {
    color: #fff;
}
.top-bar-right .divider {
    margin: 0 8px;
    opacity: 0.5;
}

/* ====== 主导航 ====== */
.main-nav {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}
.main-nav.scrolled {
    box-shadow: var(--shadow-md);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nav-logo img {
    height: 40px;
    margin-right: 12px;
}
.logo-tagline {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
    border-left: 1px solid var(--border);
    padding-left: 12px;
    margin-left: 4px;
}
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-item {
    position: relative;
}
.nav-item > a {
    display: block;
    padding: 0 20px;
    height: 72px;
    line-height: 72px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-item:hover > a,
.nav-item.active > a {
    color: var(--primary);
}
.nav-item.has-sub > a::after {
    content: "▾";
    margin-left: 4px;
    font-size: 12px;
}
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
    z-index: 100;
}
.nav-item.has-sub:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.sub-menu li a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}
.nav-cta .btn {
    padding: 10px 24px;
    font-size: 14px;
}
.nav-cta .btn-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    transition: all 0.25s ease;
    margin-right: 10px;
    background: #fff;
}
.nav-cta .btn-lang:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}
.nav-cta .btn-lang .lang-icon {
    font-size: 14px;
}
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s;
}

/* ====== Hero 主视觉（公共） ====== */
.hero-section {
    position: relative;
    min-height: 620px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 80px 0;
}
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(200,22,29,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200,22,29,0.2) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(200,22,29,0.15) 0%, transparent 40%);
}
.hero-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(200,22,29,0.5), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 80% 20%, rgba(200,22,29,0.4), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(255,255,255,0.2), transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
}
@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200,22,29,0.2);
    border: 1px solid rgba(200,22,29,0.4);
    color: #ff6b70;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 28px;
}
.badge-icon {
    font-size: 16px;
}
.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 24px;
}
.hero-title .title-main {
    display: block;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-title .title-sub {
    display: block;
    color: var(--primary);
    font-size: 42px;
    margin-top: 8px;
}
.hero-desc {
    color: rgba(255,255,255,0.75);
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 40px;
}
.hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}
.hero-stats {
    display: flex;
    align-items: center;
    gap: 40px;
}
.stat-item {
    text-align: center;
}
.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
}
.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
}
.hero-decoration {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 3;
}
.deco-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    min-width: 220px;
    transition: all 0.3s;
    animation: slideInRight 0.6s ease;
}
.deco-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(-5px);
}
.deco-icon {
    font-size: 28px;
}
.deco-info {
    display: flex;
    flex-direction: column;
}
.deco-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}
.deco-value {
    font-size: 15px;
    color: #fff;
    font-weight: 500;
    margin-top: 2px;
}
.card-access { animation-delay: 0.2s; }
.card-light { animation-delay: 0.4s; }
.card-locker { animation-delay: 0.6s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ====== CTA 行动号召 ====== */
.cta-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}
.cta-bg {
    position: absolute;
    inset: 0;
}
.cta-pattern {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(200,22,29,0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(200,22,29,0.2) 0%, transparent 40%);
}
.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}
.cta-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.3;
}
.cta-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    margin: 0 0 40px;
}
.cta-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}
.cta-note {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
}
.cta-email {
    margin-top: 16px;
    font-size: 16px;
}
.cta-email a {
    color: #fff;
    text-decoration: underline;
}

/* ====== 底部 ====== */
.main-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
}
.footer-top {
    padding: 64px 0 48px;
}
.footer-top .container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}
.footer-col ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-col ul li a:hover {
    color: var(--primary-light);
}
.footer-logo img {
    height: 36px;
    margin-bottom: 16px;
}
.footer-slogan {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.6;
    margin: 0 0 24px;
}
.footer-qr {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-qr img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
}
.footer-qr span {
    font-size: 13px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
}
.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0;
    text-align: center;
}
.footer-bottom p a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}
.footer-bottom p a:hover {
    color: var(--primary-light);
}
.footer-contact ul li {
    line-height: 2;
}
.footer-contact ul li a {
    color: var(--primary-light);
    text-decoration: none;
}
.footer-contact ul li a:hover {
    text-decoration: underline;
}

/* ====== 悬浮客服 ====== */
.floating-tools {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
}
.float-item {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.float-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}
.float-item:hover::before {
    opacity: 1;
}
.float-item > * {
    position: relative;
    z-index: 1;
}
.float-item:hover {
    color: #fff;
    transform: translateY(-2px);
}
.float-icon {
    font-size: 20px;
}
.float-label {
    font-size: 11px;
    margin-top: 2px;
    color: var(--text-gray);
}
.float-item:hover .float-label {
    color: #fff;
}
.float-trial {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}
.float-trial .float-label,
.float-trial:hover .float-label {
    color: #fff;
}
.float-trial::before {
    background: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
}
.float-trial:hover {
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.5);
}
.float-item.back-top {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.float-item.back-top.show {
    opacity: 1;
    visibility: visible;
}
#wechatBtn {
    background: linear-gradient(135deg, #07C160 0%, #06AD56 100%);
}
#wechatBtn::before {
    background: linear-gradient(135deg, #06AD56 0%, #059A4C 100%);
}
#wechatBtn .float-icon,
#wechatBtn .float-label {
    color: #fff;
}
.float-consult {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.float-consult .float-icon,
.float-consult .float-label {
    color: #fff;
}

/* ====== 微信二维码弹框 ====== */
.wechat-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.wechat-modal.active {
    opacity: 1;
    visibility: visible;
}
.wechat-modal .modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.wechat-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeInUp 0.4s ease;
}
.wechat-modal.active .modal-content {
    transform: scale(1) translateY(0);
}
.wechat-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}
.wechat-modal .modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}
.wechat-modal .modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}
.wechat-modal .modal-header p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0 0 24px;
}
.wechat-modal .modal-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.wechat-modal .modal-qr img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}
.wechat-modal .modal-tips {
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.wechat-modal .modal-tips p {
    font-size: 14px;
    color: var(--text-dark);
    margin: 4px 0;
}
.wechat-modal .modal-phone {
    font-size: 14px;
    color: var(--text-gray);
}
.wechat-modal .modal-phone a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.wechat-modal .modal-phone a:hover {
    text-decoration: underline;
}
.wechat-modal .modal-wechat-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-gray);
}
.wechat-modal .modal-wechat-id strong {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
}
.wechat-modal .copy-btn {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
}
.wechat-modal .copy-btn:hover {
    background: var(--primary-dark);
}
.wechat-modal .copy-btn.copied {
    background: #4caf50;
}
.trial-modal .modal-qr {
    width: 180px;
    height: 180px;
}
.trial-modal .modal-header h3 {
    color: #f57c00;
}

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

/* ====== 响应式 - 公共组件 ====== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 44px;
    }
    .hero-title .title-sub {
        font-size: 32px;
    }
    .footer-top .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        padding: 16px 0;
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-item > a {
        height: auto;
        line-height: normal;
        padding: 12px 24px;
    }
    .nav-cta {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .hero-section {
        padding: 60px 0;
        min-height: auto;
    }
    .hero-title {
        font-size: 32px;
    }
    .hero-title .title-sub {
        font-size: 24px;
    }
    .hero-desc {
        font-size: 15px;
    }
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    .stat-divider {
        display: none;
    }
    .hero-decoration {
        position: static;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 32px;
    }
    .deco-card {
        min-width: auto;
        flex: 1;
    }
    .footer-top .container {
        grid-template-columns: 1fr;
    }
    .floating-tools {
        right: 10px;
        bottom: 80px;
    }
    .float-item {
        width: 48px;
        height: 48px;
    }
    .cta-actions {
        flex-direction: column;
    }
}

/* ====== 滚动条样式 ====== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ====== 选择文字颜色 ====== */
::selection {
    background: #C8161D;
    color: #fff;
}
::-moz-selection {
    background: #C8161D;
    color: #fff;
}
