/* App 通用佈局與組件，風格對齊 web，繁體介面 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--cream);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}
h1, h2, h3 { font-family: var(--font-fun); font-weight: 700; color: var(--brown-dark); }
h1 { font-size: clamp(1.85rem, 5vw, 2.6rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; }
p { color: var(--text-light); font-family: var(--font-cn); }
a { color: var(--gold-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brown); }

.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding: 2.5rem 0 4rem; min-height: 82vh; }

/* 首頁：導航預設背景，圖片覆蓋導航以外整區 */
.index-page { padding-top: 0; }
.app-nav .logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.app-nav .logo-img { width: 32px; height: 32px; vertical-align: middle; border-radius: 50%; }
.app-nav .app-version { font-size: 0.75rem; color: var(--text-light); font-weight: 500; margin-left: 0.15rem; }

.index-hero {
    position: relative;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.index-hero-bg {
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.png') center center / cover no-repeat;
    opacity: 0.7;
    /* 僅底部輕微淡出，整區以圖片覆蓋 */
    mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
}
.index-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 520px;
    padding: 2rem;
}
.index-hero-content h1 { margin-bottom: 0.75rem; }
.hero-tagline { font-family: var(--font-fun); font-size: 1.25rem; color: var(--gold-dark); margin-bottom: 1.25rem; letter-spacing: 0.05em; }
.btn-hero { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* 其他頁面主視覺區 */
.page-hero { display: flex; align-items: center; justify-content: center; padding: 3rem 0 5rem; }
.hero-block {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}
.hero-block h1 { margin-bottom: 0.75rem; }

/* 頁面標題區 */
.page-header { margin-bottom: 2.5rem; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-lead { font-size: 1.05rem; max-width: 640px; }
.page-lead-sub { margin-top: 0.4rem; font-size: 0.98rem; color: var(--text-light); max-width: 640px; }

/* 頂欄 */
.app-nav {
    background: rgba(253, 248, 243, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(139, 105, 20, 0.08);
    padding: 0.85rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.app-nav .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }
.app-nav .logo { font-family: var(--font-fun); font-size: 1.4rem; font-weight: 700; color: var(--brown-dark); letter-spacing: 0.02em; }
.app-nav .nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.app-nav .nav-links a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.app-nav .nav-links a:hover { color: var(--gold-dark); }

/* 按鈕 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.6rem; border-radius: 50px; font-family: var(--font-main); font-weight: 700;
    font-size: 0.95rem; border: none; cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.9rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212, 168, 75, 0.35); color: var(--white); }
.btn-outline { background: transparent; color: var(--brown-dark); border: 2px solid var(--gold); }
.btn-outline:hover:not(:disabled) { background: var(--gold); color: var(--white); }
.btn-ghost { background: var(--cream-dark); color: var(--brown-dark); }
.btn-ghost:hover:not(:disabled) { background: var(--gold); color: var(--white); }
.btn-block { width: 100%; }

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(139, 105, 20, 0.06);
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-title { margin-bottom: 0.5rem; font-size: 1.1rem; }
.card-desc { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }

/* 表單 */
.form-group { margin-bottom: 1.35rem; }
.input-group { display: flex; gap: 0.5rem; align-items: center; }
.input-group .form-control { flex: 1; min-width: 0; }
.form-group label { display: block; font-weight: 600; color: var(--text); margin-bottom: 0.45rem; font-size: 0.95rem; }
.form-control {
    width: 100%; padding: 0.8rem 1.1rem; border: 2px solid var(--cream-dark);
    border-radius: var(--radius-sm); font-family: var(--font-main); font-size: 1rem;
    transition: var(--transition); background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.18); }
.form-control::placeholder { color: #aaa; }
.form-hint { font-size: 0.85rem; color: var(--text-light); margin-top: 0.4rem; }

/* 錢包連接區 */
.wallet-bar {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.wallet-addr { font-family: monospace; font-size: 0.9rem; color: var(--brown-dark); }
.wallet-addr.short { font-size: 0.85rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.status-dot.off { background: #bbb; }

/* 提示與狀態 */
.alert {
    padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-info { background: rgba(212, 168, 75, 0.12); color: var(--brown-dark); border: 1px solid rgba(212, 168, 75, 0.25); }
.alert-warn { background: #fff8e6; color: #8b6914; border: 1px solid #f0d890; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.badge { display: inline-block; padding: 0.28rem 0.65rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }
.badge-gold { background: rgba(212, 168, 75, 0.2); color: var(--brown-dark); }
.badge-done { background: #e8f5e9; color: #2e7d32; }

/* 網格入口 */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.35rem; }
.entry-card {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.75rem; text-align: center; transition: var(--transition);
    border: 2px solid transparent; text-decoration: none; color: inherit; display: block;
}
.entry-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.entry-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 14px; background: rgba(212, 168, 75, 0.15); color: var(--gold); font-size: 1.5rem; margin-bottom: 1rem; }
.entry-card h3 { margin-bottom: 0.4rem; }
.entry-card p { font-size: 0.9rem; margin: 0; color: var(--text-light); }

/* 組 LP 卡片 */
.lp-input-row { margin-bottom: 0.5rem; }
.lp-label { display: block; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; font-size: 0.9rem; }
.lp-input-wrap { display: flex; align-items: center; gap: 0.5rem; border: 2px solid var(--cream-dark); border-radius: var(--radius-sm); background: var(--white); padding: 0 1rem; }
.lp-input-wrap .lp-input { border: none; padding: 0.85rem 0; flex: 1; min-width: 0; }
.lp-input-wrap .lp-input:focus { box-shadow: none; }
.lp-input-wrap .lp-max { flex-shrink: 0; }
.lp-token-logo { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.lp-symbol { font-weight: 600; color: var(--brown-dark); font-size: 0.95rem; }
.lp-divider { text-align: center; padding: 0.5rem 0; color: var(--gold); font-size: 1.25rem; cursor: pointer; user-select: none; }
.estimated-lp-usdt { font-size: 1rem; color: var(--text); }
.estimated-lp-usdt strong { color: var(--brown-dark); }

/* 頁腳 */
.app-footer { text-align: center; padding: 1.75rem; color: var(--text-light); font-size: 0.9rem; border-top: 1px solid var(--cream-dark); }

/* 工具類 */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
