/* ============ Reset & Base ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #f39c12;
    --accent: #e91e63;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #fafafa;
    --white: #fff;
    --border: #eee;
    --shadow: 0 2px 20px rgba(0,0,0,.08);
    --shadow-hover: 0 8px 40px rgba(0,0,0,.12);
    --radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.85;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============ Header ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 2px 20px rgba(0,0,0,.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-img-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #fff5f5, #fef3e2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(231, 76, 60, 0.15);
    transition: var(--transition);
    flex-shrink: 0;
}

.logo:hover .logo-img-wrap {
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
    transform: scale(1.08);
}

.logo-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
    border-radius: 50%;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    transition: var(--transition);
    white-space: nowrap;
}

.logo:hover .logo-text {
    color: var(--primary-dark);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 16px;
    color: var(--text);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ============ Hero ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #fff5f5 0%, #fef3e2 20%, #fce4ec 45%, #fff8e1 65%, #fce4ec 85%, #fff5f5 100%);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233,30,99,.12) 0%, transparent 70%);
    animation: hero-float-1 8s ease-in-out infinite;
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -8%;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(243,156,18,.1) 0%, transparent 70%);
    animation: hero-float-2 10s ease-in-out infinite;
}

@keyframes hero-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes hero-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, -30px) scale(1.08); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(36px, 7vw, 58px);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 24px;
    color: var(--text);
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(231,76,60,.15);
    border-radius: 5px;
    z-index: -1;
}

.hero-subtitle {
    font-size: clamp(20px, 2.5vw, 26px);
    color: var(--text-light);
    margin-bottom: 48px;
    line-height: 1.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(233,30,99,.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233,30,99,.4);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    z-index: 1;
}

.hero-wave svg {
    width: 100%;
    height: 100px;
}

/* ============ Sections Common ============ */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-light);
    margin-top: 20px;
}

/* ============ About ============ */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
}

.about-card {
    text-align: center;
    padding: 50px 36px;
    border-radius: var(--radius);
    background: var(--bg);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
    background: var(--white);
}

.about-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: inline-block;
    transition: var(--transition);
}

.about-card:hover .about-icon {
    transform: scale(1.15);
}

.about-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text);
}

.about-card p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.9;
}

/* ============ Guide / Steps ============ */
.guide {
    background: var(--white);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 70px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    padding: 30px 20px;
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--bg);
    border: 1px solid transparent;
}

.step:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    border-color: var(--border);
}

.step-num {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 20px;
    box-shadow: 0 6px 24px rgba(233,30,99,.3);
    transition: var(--transition);
}

.step:hover .step-num {
    transform: scale(1.1);
}

.step h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
}

.step-arrow {
    font-size: 36px;
    color: var(--primary);
    font-weight: 300;
    opacity: .4;
}

.qrcode-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.qrcode-card {
    text-align: center;
}

.qrcode-box {
    width: 240px;
    height: 240px;
    background: var(--white);
    border: 2px dashed var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    padding: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.qrcode-box:hover {
    border-style: solid;
    box-shadow: 0 4px 20px rgba(231,76,60,.12);
}

.qrcode-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qrcode-placeholder {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-lighter);
    font-size: 13px;
}

.qrcode-placeholder span:first-child {
    font-size: 40px;
}

.qrcode-tip {
    font-size: 17px;
    color: var(--primary);
    font-weight: 600;
}

.qrcode-info {
    max-width: 360px;
}

.qrcode-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text);
}

.qrcode-info > p {
    color: var(--text-light);
    margin-bottom: 10px;
    font-size: 16px;
}

.miniapp-name {
    background: var(--bg);
    padding: 12px 24px;
    border-radius: 10px;
    display: inline-block;
    margin: 10px 0 24px;
    font-size: 17px;
}

.guide-tips {
    background: #fff8e1;
    padding: 20px 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
}

.guide-tips h4 {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.guide-tips li {
    font-size: 14px;
    color: var(--text-light);
    padding: 4px 0 4px 18px;
    position: relative;
}

.guide-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

/* ============ Contact ============ */
.contact {
    background: var(--white);
}

.contact-grid {
    max-width: 960px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 30px 28px;
    background: var(--bg);
    border-radius: var(--radius);
    transition: var(--transition);
    flex: 1 1 280px;
    min-width: 260px;
    max-width: 380px;
}

.contact-item:hover {
    background: #fff5f5;
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 17px;
    margin-bottom: 6px;
}

.contact-item p {
    font-size: 16px;
    color: var(--text-light);
}

/* ============ Footer ============ */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.9;
    color: #aaa;
}

.footer-links h4 {
    font-size: 17px;
    color: var(--white);
    margin-bottom: 18px;
}

.footer-links a {
    display: block;
    font-size: 15px;
    color: #aaa;
    padding: 5px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-qr-box {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    overflow: hidden;
    padding: 4px;
}

.footer-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-qr-placeholder {
    display: none;
    font-size: 36px;
}

.footer-qrcode p {
    font-size: 12px;
    color: #777;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.footer-bottom .icp-number {
    margin-top: 6px;
    font-size: 13px;
}

.footer-bottom .icp-number a {
    color: #888;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom .icp-number a:hover {
    color: var(--primary);
}

/* ============ Back to Top ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(231,76,60,.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ============ Scroll Animation ============ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Direct Launch ============ */
.direct-launch {
    text-align: center;
    margin-bottom: 60px;
    padding: 36px 24px;
    background: linear-gradient(135deg, #fff5f5, #fef3e2);
    border-radius: var(--radius);
    border: 1px dashed var(--primary);
}

.btn-launch-direct {
    font-size: 20px;
    padding: 18px 44px;
    animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 4px 20px rgba(233,30,99,.3); }
    50% { box-shadow: 0 8px 35px rgba(233,30,99,.5); transform: translateY(-2px); }
}

.direct-launch-hint {
    font-size: 14px;
    color: var(--text-lighter);
    margin-top: 12px;
}

/* ============ Floating Launch Button ============ */
.floating-launch {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.floating-launch.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-launch.at-bottom {
    bottom: 130px;
}

.floating-launch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(233,30,99,.4);
    animation: pulse-btn 2s infinite;
    white-space: nowrap;
}

.floating-launch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(233,30,99,.5);
}

/* On desktop, show as normal button without floating */
@media (min-width: 769px) {
    .floating-launch {
        display: none !important;
    }
}

/* ============ Modal ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    padding: 30px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    transform: translateY(20px);
    transition: transform .3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: var(--bg);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: #fce4ec;
    color: var(--primary);
}

.modal-icon {
    font-size: 50px;
    margin-bottom: 12px;
}

.modal-box h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text);
}

.modal-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-action-item {
    text-align: center;
}

.modal-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
}

.modal-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,30,99,.4);
}

.modal-action-copy {
    background: var(--white);
    color: var(--text);
    border: 2px solid var(--border);
}

.modal-action-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.modal-action-hint {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 6px;
}

.modal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-lighter);
    font-size: 13px;
    margin: 4px 0;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.modal-qr {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-lighter);
}

.modal-qr .qrcode-box {
    margin-top: 10px;
}

/* ============ Legal Pages ============ */
.legal-page {
    padding: 100px 0 60px;
    background: var(--white);
}

.legal-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legal-content h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    text-align: center;
}

.legal-update {
    text-align: center;
    font-size: 14px;
    color: var(--text-lighter);
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 16px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}

.legal-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 20px 0 12px;
}

.legal-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 12px;
    text-align: justify;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.legal-content ul li {
    font-size: 15px;
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 4px;
}

.legal-content ul ul {
    list-style: circle;
    margin-top: 8px;
    margin-bottom: 8px;
}

.legal-content strong {
    color: var(--text);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        height: 60px;
    }

    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 8px;
        transform: translateY(-120%);
        transition: transform .3s ease;
        z-index: 999;
    }

    .nav.active {
        transform: translateY(0);
    }

    .nav-link {
        text-align: center;
        padding: 12px;
        font-size: 16px;
    }

    .logo-img-wrap {
        width: 38px;
        height: 38px;
        border-radius: 50%;
    }

    .logo-text {
        font-size: 18px;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 110px 0 60px;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 28px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 70px 0;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-qrcode {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .qrcode-section {
        flex-direction: column;
        gap: 30px;
    }

    .steps {
        flex-direction: column;
        gap: 12px;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .legal-page {
        padding: 80px 0 40px;
    }

    .legal-content {
        padding: 24px 18px;
    }

    .legal-content h1 {
        font-size: 22px;
    }

    .legal-content h2 {
        font-size: 17px;
    }
}
