﻿:root {
    --primary: #26A17B;
    --primary-dark: #1C7D5F;
    --primary-light: #E8F8F3;
    --cyan1: #02defe;
    --cyan2: #119afa;
    --green: #19ff80;
    --bg: #f4f6f8;
    --bg-white: #ffffff;
    --bg-dark: #011e3e;
    --bg-card: #ffffff;
    --border: #e6e6e6;
    --text: #000000;
    --text1: #333333;
    --text2: #666666;
    --text3: #999999;
    --text5: #c4c4c4;
    --success: #1EC677;
    --warning: #F0B90B;
    --danger: #F6465D;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --max-width: 400px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
.hidden { display: none !important; }
.container { max-width: var(--max-width); margin: 0 auto; position: relative; min-height: 100vh; padding-bottom: 20px; }

/* ===== Splash ===== */
.splash { position: fixed; inset: 0; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.4s ease; }
.splash-logo { margin-bottom: 16px; animation: pulse 1.8s ease-in-out infinite; }
.splash-name { font-size: 20px; font-weight: 800; margin-bottom: 24px; }
.splash-bar { width: 100px; height: 2px; background: var(--border); border-radius: 1px; overflow: hidden; }
.splash-bar-fill { width: 40%; height: 100%; background: var(--primary); border-radius: 1px; animation: bar-slide 1.2s ease-in-out infinite; }
@keyframes bar-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ===== Header ===== */
.header { position: fixed; top: 0; left: 0; right: 0; max-width: var(--max-width); margin: 0 auto; z-index: 100; transition: all 0.3s ease; }
.header.show_bg { background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.header-box { height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 0.8rem 0 0.5rem; }
.header-left { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.header-logo { display: flex; }
.header-title { font-size: 15px; font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 8px; }
.btn-connect-header { display: flex; align-items: center; gap: 5px; background: var(--primary); color: white; border: none; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; }
.header-user { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; border-radius: 20px; cursor: pointer; }
.header-avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); }
.header-addr { font-size: 12px; font-weight: 600; color: var(--text1); font-family: monospace; }
.header-menu-btn { background: transparent; border: none; color: var(--text1); cursor: pointer; display: flex; padding: 4px; }

/* ===== Drawer ===== */
.drawer { position: fixed; inset: 0; z-index: 2000; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.drawer-box { position: absolute; right: 0; top: 0; bottom: 0; width: 75%; max-width: 300px; background: #fff; display: flex; flex-direction: column; animation: drawer-in 0.3s ease; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer-title { font-size: 16px; font-weight: 700; }
.drawer-close { background: transparent; border: none; color: var(--text3); cursor: pointer; display: flex; padding: 4px; }
.drawer-body { flex: 1; padding: 16px 0; overflow-y: auto; }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 16px 20px; margin-bottom: 8px; }
.drawer-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); }
.drawer-addr { font-size: 14px; font-weight: 600; font-family: monospace; }
.drawer-uid { font-size: 12px; color: var(--text3); margin-top: 2px; }
.drawer-section-title { font-size: 12px; color: var(--text3); padding: 8px 20px; text-transform: uppercase; }
.drawer-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--text1); text-decoration: none; font-size: 15px; cursor: pointer; transition: background 0.2s ease; }
.drawer-item:hover { background: var(--bg); }
.drawer-item svg { color: var(--text2); flex-shrink: 0; }
.drawer-divider { height: 1px; background: var(--border); margin: 12px 20px; }
.btn-logout-drawer { width: calc(100% - 40px); margin: 0 20px; background: #000; color: white; border: none; padding: 12px; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-login-drawer { width: calc(100% - 40px); margin: 0 20px; background: #fff; color: #000; border: 1px solid var(--text3); padding: 12px; border-radius: 50px; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* ===== Hero with Stars ===== */
.hero { position: relative; padding: 6rem 20px 1.8rem; text-align: center; overflow: hidden; background: var(--bg-dark); }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg-dark) 0%, #0a2a5c 50%, var(--bg-dark) 100%); }
.stars { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.6), transparent), radial-gradient(2px 2px at 60px 70px, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 50px 50px, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent), radial-gradient(2px 2px at 90px 10px, rgba(255,255,255,0.4), transparent), radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.3), transparent); background-size: 200px 150px; opacity: 0.6; }
.twinkling { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 25px 35px, rgba(255,255,255,0.8), transparent), radial-gradient(1px 1px at 120px 60px, rgba(255,255,255,0.5), transparent), radial-gradient(1px 1px at 80px 90px, rgba(255,255,255,0.6), transparent); background-size: 200px 150px; opacity: 0.4; animation: twinkle 50s linear infinite; }
@keyframes twinkle { from { transform: translateY(0); } to { transform: translateY(-200px); } }
.hero-content { position: relative; z-index: 2; }
.hero-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.hero-title { font-size: 1.5rem; font-weight: 800; color: white; animation: fadeInDown 1s ease; }
.hero-subtitle { font-size: 1rem; color: var(--text5); margin-top: 4px; animation: fadeInUp 1s ease; }
.hero-tabs { display: flex; gap: 16px; margin-top: 28px; animation: fadeInUp 1s ease 0.6s both; }
.hero-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.hero-tab-icon { width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.hero-tab-icon.defi { background: linear-gradient(135deg, var(--cyan1), var(--cyan2)); animation: float 3s ease-in-out infinite; }
.hero-tab-icon.swap { background: #000; animation: float 3s ease-in-out infinite 0.5s; }
.hero-tab span { font-size: 13px; color: white; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== Modules ===== */
.module { padding: 0.6rem; margin-top: 0.6rem; }
.module-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 2px; }
.module-subtitle { font-size: 13px; color: var(--text3); margin-bottom: 12px; }
.module-banner { background: linear-gradient(135deg, var(--bg-dark), #0a3a7c); border-radius: var(--radius); overflow: hidden; position: relative; }
.module-banner-bg { position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(2,222,254,0.15), transparent 60%); }
.module-banner-content { position: relative; padding: 24px 20px; text-align: center; color: white; }
.module-apy { font-size: 12px; color: rgba(255,255,255,0.6); }
.module-apy-val { font-size: 32px; font-weight: 800; color: var(--cyan1); margin: 4px 0 16px; }
.btn-module { background: linear-gradient(135deg, var(--cyan1), #149ff2); color: white; border: none; padding: 10px 28px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* ===== Swiper ===== */
.swiper { position: relative; overflow: hidden; border-radius: var(--radius); }
.swiper-track { display: flex; transition: transform 0.4s ease; }
.swiper-slide { min-width: 100%; }
.slide-card { height: 160px; border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; }
.slide-1 { background: linear-gradient(135deg, #011e3e, #0a3a7c); color: white; }
.slide-2 { background: linear-gradient(135deg, #1a1b24, #2a2d4a); color: white; }
.slide-3 { background: linear-gradient(135deg, #0d1f3c, #1a3a6c); color: white; }
.slide-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.slide-desc { font-size: 13px; opacity: 0.7; }
.swiper-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.swiper-dot { width: 6px; height: 6px; border-radius: 50%; background: #ccc; transition: all 0.3s ease; }
.swiper-dot.active { background: white; width: 16px; border-radius: 3px; }

/* ===== Info Cards ===== */
.info-cards { display: flex; flex-direction: column; gap: 10px; }
.info-card { display: flex; align-items: center; gap: 14px; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: 88px; position: relative; overflow: hidden; }
.info-card::before { content: ''; position: absolute; top: -30px; right: -20px; width: 80px; height: 80px; border-radius: 50%; opacity: 0.05; }
.info-card-1::before { background: var(--primary); }
.info-card-2::before { background: var(--green); }
.info-card-3::before { background: var(--cyan1); }
.info-card-icon { width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.info-card-text { flex: 1; }
.info-card-title { font-size: 15px; font-weight: 700; }
.info-card-desc { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ===== Transaction List ===== */
.tx-list-container { position: relative; height: 300px; overflow: hidden; background: white; border: 1px solid var(--border); border-radius: var(--radius); }
.tx-list-mask-top { position: absolute; top: 0; left: 0; right: 0; height: 30px; background: linear-gradient(180deg, white, transparent); z-index: 2; }
.tx-list-mask-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 30px; background: linear-gradient(0deg, white, transparent); z-index: 2; }
.tx-list { position: absolute; top: 0; left: 0; right: 0; }
.tx-item { display: flex; justify-content: space-between; align-items: center; height: 54px; padding: 0 16px; border-bottom: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s ease; }
.tx-item:hover { transform: translateX(5px); }
.tx-addr { font-size: 13px; font-family: monospace; color: var(--text1); }
.tx-amt { font-size: 15px; font-weight: 600; color: var(--primary); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; cursor: pointer; font-size: 15px; font-weight: 600; }
.faq-header svg { color: var(--text3); transition: transform 0.3s ease; flex-shrink: 0; }
.faq-item.open .faq-header svg { transform: rotate(180deg); }
.faq-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-body { max-height: 200px; }
.faq-body p { padding: 0 16px 14px; font-size: 13px; color: var(--text2); line-height: 1.8; }

/* ===== Invite Banner ===== */
.invite-banner { padding: 0.6rem; }
.invite-content { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.invite-title { font-size: 15px; font-weight: 700; color: white; }
.invite-sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.btn-invite-go { background: white; color: var(--primary); border: none; padding: 8px 16px; border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }

/* ===== Footer ===== */
.footer { padding: 20px 16px; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; }
.footer-links a { font-size: 12px; color: var(--text3); text-decoration: none; }
.footer-copy { font-size: 11px; color: var(--text5); }

/* ===== Float Service ===== */
.float-service { position: fixed; right: 16px; bottom: 80px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 200; box-shadow: 0 4px 16px rgba(39,114,255,0.3); }

/* ===== Toast ===== */
.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.85); color: white; border-radius: 8px; padding: 10px 18px; font-size: 13px; z-index: 5000; animation: toast-in 0.3s ease; max-width: 80%; text-align: center; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

@media screen and (min-width: 400px) { .header { left: calc(50% - 200px); right: calc(50% - 200px); } }
@media (max-width: 360px) { .hero-title { font-size: 1.25rem; } .module-title { font-size: 1.2rem; } }
