:root { --primary: #FBBF24; --secondary: #2563EB; --text: #374151; --light: #F9FAFB; }
* { margin:0; padding:0; box-sizing:border-box; font-family:'Inter', sans-serif; }
body { background:#fff; color:var(--text); line-height:1.6; padding-top:70px; }

/* Editorial content block: article-style writing (h3 sections / <details>
   FAQ accordions) on the homepage. */
.v22-editorial {
  max-width: 760px;
  margin: 40px auto;
  padding: 40px 32px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  color: #1F2937;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.75;
}
.v22-editorial h2 {
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.v22-editorial h3 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(17px, 2vw, 20px);
  color: #111827;
  margin: 28px 0 10px;
  font-weight: 700;
  line-height: 1.35;
}
.v22-editorial p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.75;
  color: #1F2937;
}
.v22-editorial a {
  color: #2563EB;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.v22-editorial details.v22-faq-item {
  font-family: 'Inter', sans-serif;
  border-top: 1px solid #E5E7EB;
  padding: 12px 0;
  margin: 0;
}
.v22-editorial details.v22-faq-item:last-of-type {
  border-bottom: 1px solid #E5E7EB;
}
.v22-editorial details.v22-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: #1F2937;
  list-style: none;
  padding-right: 28px;
  position: relative;
  line-height: 1.5;
}
.v22-editorial details.v22-faq-item summary::-webkit-details-marker { display: none; }
.v22-editorial details.v22-faq-item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 0;
  font-size: 22px;
  color: #2563EB;
  font-weight: 400;
  line-height: 1.4;
}
.v22-editorial details.v22-faq-item[open] summary::after { content: '−'; }
.v22-editorial details.v22-faq-item p {
  margin: 10px 0 4px;
  font-size: 14px;
  color: #4B5563;
  line-height: 1.7;
}
@media (max-width: 640px) {
  .v22-editorial { margin: 24px 12px; padding: 24px 18px; }
}
header { background:rgba(255,255,255,0.95); backdrop-filter:blur(10px); padding:15px 5%; display:grid; grid-template-columns: 180px 1fr 200px 180px; align-items:center; position:fixed; width:100%; top:0; z-index:1000; border-bottom:1px solid #eee; gap: 10px; }
.prize-link { position: fixed; top: 85px; left: 20px; z-index: 1100; text-decoration:none; color:#1E40AF; background:#FEF3C7; padding:10px 18px; border-radius:12px; font-weight:700; font-size:14px; display:flex; align-items:center; border:1px solid #FDE68A; white-space:nowrap; transition:0.3s; box-shadow: 0 10px 20px rgba(245, 158, 11, 0.15); }
.prize-link:hover { background:#FDE68A; transform:translateY(-3px); box-shadow: 0 12px 25px rgba(245, 158, 11, 0.25); }
.prize-link i { color:#F59E0B; margin-right:10px; font-size:18px; }

.kids-link { position: fixed; top: 85px; right: 20px; z-index: 1100; text-decoration:none; color:#065F46; background:#D1FAE5; padding:10px 18px; border-radius:12px; font-weight:700; font-size:14px; display:flex; align-items:center; border:1px solid #A7F3D0; white-space:nowrap; transition:0.3s; box-shadow: 0 10px 20px rgba(16, 185, 129, 0.15); }
.kids-link:hover { background:#A7F3D0; transform:translateY(-3px); box-shadow: 0 12px 25px rgba(16, 185, 129, 0.25); }
.kids-link i { color:#10B981; margin-right:10px; font-size:18px; }
.logo { text-decoration:none; color:#000; display:flex; align-items:center; font-weight:800; font-size:20px; justify-self: start; }
nav { justify-self: center; display: flex; align-items: center; }
nav a { text-decoration:none; color:var(--text); margin:0 10px; font-weight:600; font-size:14px; white-space: nowrap; }

.search-box { position: relative; width: 100%; max-width: 200px; justify-self: center; }
.search-box input { margin-bottom: 0; padding: 8px 12px; font-size: 14px; border-radius: 20px; background: #f3f4f6; border: 1px solid transparent; width: 100%; }
.search-box input:focus { outline: none; border-color: var(--secondary); background: #fff; }
.search-results { position: absolute; top: 110%; left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-height: 300px; overflow-y: auto; display: none; z-index: 1001; border: 1px solid #eee; }
.search-item { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: 0.2s; }
.search-item:hover { background: #f8fafc; }
.search-item .title { font-weight: 700; font-size: 14px; color: var(--secondary); display: block; }
.search-item .type { font-size: 11px; background: #e2e8f0; padding: 2px 6px; border-radius: 4px; color: #64748b; margin-top: 4px; display: inline-block; }

.lang-switch { justify-self: end; display: inline-flex; gap: 8px; font-weight: 800; font-size: 12px; color: #2563EB; white-space: nowrap; }
.lang-switch [role="button"] { padding: 3px 8px; border-radius: 999px; transition: all .15s; }
.lang-switch [role="button"]:hover { background: #EFF6FF; }
.lang-switch [role="button"].active { background: #2563EB; color: #fff; }

.hero { position: relative; height: 100vh; min-height: 500px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; padding: 0; clip-path: none; }
#hero-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: 0; transform: translate(-50%, -50%); object-fit: cover; opacity: 0.7; pointer-events: none; }
/* v2.x perf: 行動裝置隱藏影片、顯示靜態圖;桌機反之 */
.hero-image-mobile { display: none; }
@media (max-width: 768px) {
  .hero-video-desktop { display: none !important; }
  .hero-image-mobile { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; z-index: 0; }
}
.hero::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: -1; }
.hero-content { position: relative; z-index: 10; text-align: center; color: #fff; padding: 20px; max-width: 900px; pointer-events: auto; }
.hero h1 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; margin-bottom: 20px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.5); line-height: 1.2; }
.hero p { font-size: 20px; font-weight: 600; color: var(--primary); margin-bottom: 25px; text-shadow: 0 1px 5px rgba(0,0,0,0.5); }

.hero-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 30px; }
.hero-list li { background: rgba(255,255,255,0.1); backdrop-filter: blur(5px); padding: 10px 20px; border-radius: 50px; font-weight: 700; font-size: 16px; border: 1px solid rgba(255,255,255,0.2); transition: 0.3s; }
.hero-list li:hover { background: var(--secondary); transform: scale(1.05); border-color: transparent; }

.hero-footer { font-size: 16px !important; font-weight: 500 !important; color: #ddd !important; max-width: 700px; margin: 0 auto 30px !important; line-height: 1.5; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

.section { padding:80px 10%; }
.alt-bg { background:var(--light); }
.section-title { text-align:center; margin-bottom:40px; font-size:32px; font-weight:800; }

.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:30px; }
.card { background:#fff; padding:40px; border-radius:20px; box-shadow:0 10px 15px rgba(0,0,0,0.05); text-align:center; transition:0.3s; }
.card:hover { transform: translateY(-10px); }
.card i { font-size:40px; color:var(--secondary); margin-bottom:20px; display:block; }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }

.download-link {
    display: inline-block;
    padding: 10px 20px;
    background: #2563EB;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.download-link:hover {
    background: #1D4ED8;
}

.qr-box {
    margin: 15px auto;
    display: flex;
    justify-content: center;
}

/* App-download row: app icon on the left, QR codes on the right.
   Stacks vertically on narrow screens. */
.qr-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.qr-row .qr-app-icon {
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18));
}
.qr-row .qr-codes img {
    display: block;
    width: 200px;
    height: auto;
    background: #FFF;
    border-radius: 8px;
    padding: 5px;
}
@media (max-width: 480px) {
    .qr-row { flex-direction: column; gap: 12px; }
    .qr-row .qr-app-icon { width: 72px; height: 72px; }
    .qr-row .qr-codes img { width: 190px; }
}

.support-grid { max-width:950px; margin:0 auto; }
.faq-container { 
    max-width: 950px; 
    margin: 0 auto; 
    max-height: 550px; 
    overflow-y: auto; 
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cat-title { margin:40px 0 20px; font-weight:800; font-size:20px; color:var(--secondary); border-left:5px solid var(--primary); padding-left:15px; }
.item-box { background:#fff; border-radius:12px; border:1px solid #f0f0f0; overflow:hidden; flex-shrink: 0; }
.item-header { padding:18px 25px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; font-weight:700; font-size:15px; transition: 0.3s; }
.item-header:hover { background: #fffbeb; }
.item-content { max-height:0; overflow:hidden; transition:0.3s ease-out; background:#fafafa; }
.item-box.active .item-content { max-height:2000px; padding:15px 25px 25px; border-top:1px solid #f0f0f0; }

.doc-list { list-style:none; }
.doc-list li { padding:10px 0; border-bottom:1px solid #eee; }
.doc-list a { text-decoration:none; color:var(--secondary); font-size:14px; font-weight:600; display:block; }
.doc-list a:hover { color: var(--primary); }

.registration { max-width:600px; margin:40px auto; background:#fff; padding:40px; border-radius:24px; box-shadow:0 20px 25px rgba(0,0,0,0.1); width: 90%; }
input { width:100%; padding:15px; border:1px solid #ddd; border-radius:12px; margin-bottom:20px; font-size:16px; display: block; }
.btn-primary { background:var(--secondary); color:#fff; border:none; border-radius:12px; font-weight:700; cursor:pointer; font-size:16px; padding: 16px 40px; display: inline-block; text-decoration: none; }

footer { background:#111827; color:#fff; padding:60px 10%; text-align:center; }
@media (max-width: 992px) { 
    header { 
        grid-template-columns: 1fr auto auto; 
        padding: 10px 3%; 
    }
    nav { display: none; } /* 隱藏桌面型導航 */
    .search-box { max-width: 150px; }
    .prize-link { top: 75px; left: 10px; padding: 8px 12px; font-size: 12px; }
    .kids-link { top: 75px; right: 10px; padding: 8px 12px; font-size: 12px; }
}

@media (max-width: 480px) {
    header {
        grid-template-columns: auto 1fr auto;
    }
    .logo span { display: none; } /* 手機端只顯示圖標以騰出空間 */
    .search-box { max-width: 120px; }
    .prize-link { top: 65px; left: 10px; }
    .prize-link span { display: none; }
    .kids-link { top: 65px; right: 10px; }
    .kids-link span { display: none; }
}
