/* ============================================================
   StarTix 樣式表 — 簡潔、務實的售票網站風格
   支援亮色／暗色模式：透過 <html data-theme="dark"> 切換
   ============================================================ */
:root {
    --primary: #1a56c4;
    --primary-dark: #123f94;
    --primary-light: #eaf1fc;
    --accent: #e5484d;
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-alt: #f7f8fa;
    --text: #222222;
    --mute: #767676;
    --border: #dfe1e6;
    --success: #2fae66;
    --danger: #e5484d;
    --radius: 6px;
}
html[data-theme="dark"] {
    --primary: #5b8fe0;
    --primary-dark: #7fabf0;
    --primary-light: #1c2740;
    --accent: #ff7a7e;
    --bg: #14161c;
    --surface: #1c1f28;
    --surface-alt: #22252f;
    --text: #e7e8ec;
    --mute: #a2a6ba;
    --border: #33374a;
    --success: #4bd394;
    --danger: #ff7a7e;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    transition: background-color .15s ease, color .15s ease;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 1px;
}

/* ------------------------------------------------------------
   Header / Nav
   ------------------------------------------------------------ */
.topbar {
    background: var(--primary);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 12px 20px;
    flex-wrap: wrap;
}
.brand {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-star { color: #ffd166; }
.brand-logo { height: 28px; width: auto; border-radius: 4px; vertical-align: middle; margin-right: 4px; }
.mainnav { display: flex; gap: 20px; flex: 1; }
.mainnav a { font-size: 14px; color: rgba(255,255,255,.92); }
.mainnav a:hover { text-decoration: underline; }
.searchbox { display: flex; }
.searchbox input {
    border: none; border-radius: var(--radius) 0 0 var(--radius); padding: 7px 12px; width: 190px;
}
.searchbox button {
    border: none; background: #fff; color: var(--primary); padding: 7px 14px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-weight: 700;
}
.account a { font-size: 13.5px; white-space: nowrap; color: #fff; }

.theme-toggle {
    border: none; background: rgba(255,255,255,.15); color: #fff; width: 32px; height: 32px;
    border-radius: 50%; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: rgba(255,255,255,.28); }

.navtoggle { display: none; }
@media (max-width: 760px) {
    .navtoggle {
        display: inline-flex; align-items: center; justify-content: center;
        width: 32px; height: 32px; border-radius: 4px; background: rgba(255,255,255,.15);
        border: none; color: #fff; font-size: 17px; cursor: pointer; margin-left: auto; order: 1;
    }
    .brand { order: 0; }
    .searchbox { order: 3; width: 100%; margin-top: 6px; }
    .searchbox input { flex: 1; width: auto; }
    .account { order: 2; }
    .mainnav {
        order: 4; width: 100%; flex-direction: column; gap: 0;
        max-height: 0; overflow: hidden; transition: max-height .2s ease;
    }
    .mainnav.open { max-height: 200px; padding-top: 4px; }
    .mainnav a { padding: 8px 4px; display: block; border-top: 1px solid rgba(255,255,255,.15); }
}

.verify-banner {
    background: #fff4e5; color: #9a5b00; text-align: center; padding: 8px 16px; font-size: 13px;
    border-bottom: 1px solid #ffdca3;
}
.verify-banner a { color: #9a5b00; text-decoration: underline; font-weight: 600; }

.page-wrap { max-width: 1200px; margin: 0 auto; padding: 20px 20px 60px; min-height: 60vh; }
.breadcrumb { font-size: 13px; color: var(--mute); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ------------------------------------------------------------
   Hero banner（首頁上方橫幅，單純圖片，不做疊字設計）
   ------------------------------------------------------------ */
.hero {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 24px; padding: 22px 24px;
}
.hero h1 { font-size: 20px; margin: 0 0 8px; }
.hero p.lead { font-size: 13.5px; color: var(--mute); margin: 0 0 16px; max-width: 640px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------
   Featured carousel（首頁主視覺輪播）
   ------------------------------------------------------------ */
.featured-carousel {
    position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
    background: var(--surface-alt); border: 1px solid var(--border);
}
.featured-carousel .fc-track { display: flex; transition: transform .4s ease; }
.featured-carousel .fc-slide { flex: 0 0 100%; position: relative; }
.featured-carousel .fc-slide img { width: 100%; height: 320px; object-fit: cover; display: block; }
.featured-carousel .fc-slide .fc-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff; font-size: 15px; font-weight: 700;
}
.featured-carousel .fc-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.35); color: #fff; border: none; width: 34px; height: 34px;
    border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.featured-carousel .fc-nav:hover { background: rgba(0,0,0,.55); }
.featured-carousel .fc-prev { left: 12px; }
.featured-carousel .fc-next { right: 12px; }
.featured-carousel .fc-dots {
    position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px;
}
.featured-carousel .fc-dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; padding: 0;
}
.featured-carousel .fc-dot.active { background: #fff; }
@media (max-width: 720px) {
    .featured-carousel .fc-slide img { height: 180px; }
}

/* ------------------------------------------------------------
   Section titles / cards
   ------------------------------------------------------------ */
.section-title {
    font-size: 17px; font-weight: 700; margin: 26px 0 12px;
    display: flex; align-items: center; justify-content: space-between;
    border-left: 4px solid var(--primary); padding-left: 10px;
}
.section-title a { font-size: 13px; color: var(--primary); font-weight: 500; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.event-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.event-card:hover { border-color: var(--primary); }
.event-card img { width: 100%; height: 128px; object-fit: cover; display: block; }
.event-card .body { padding: 10px 12px 12px; }
.event-card .date { font-size: 12px; color: var(--primary); font-weight: 600; }
.event-card .title { font-size: 14px; margin-top: 4px; line-height: 1.45; color: var(--text); }

.event-banner { border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; border: 1px solid var(--border); }
.event-banner img { width: 100%; display: block; }

.pill-soldout { display: inline-block; padding: 6px 16px; border-radius: 4px; background: var(--surface-alt); color: var(--mute); font-size: 13px; }
.pill-waiting { display: inline-block; padding: 6px 16px; border-radius: 4px; background: var(--primary-light); color: var(--primary); font-size: 13px; }

.status-pill { display: inline-block; padding: 3px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.status-pill.is-success { background: rgba(47,174,102,.15); color: var(--success); }
.status-pill.is-pending { background: rgba(255,244,229,.5); color: #d38a1f; }
html[data-theme="dark"] .status-pill.is-pending { background: rgba(211,138,31,.18); color: #f0b355; }
.status-pill.is-cancelled { background: var(--surface-alt); color: var(--mute); }

/* ------------------------------------------------------------
   News list
   ------------------------------------------------------------ */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li {
    display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
    padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.news-list li a:hover { text-decoration: underline; }
.tag-badge {
    background: var(--surface-alt); color: var(--mute); font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 3px; white-space: nowrap;
}
.tag-new { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------
   Steps indicator（步驟指示器 — 圓圈連接線，貼近原始參考截圖）
   ------------------------------------------------------------ */
.steps { display: flex; align-items: flex-start; margin: 20px 0 28px; }
.steps .step { flex: 1; text-align: center; position: relative; font-size: 12.5px; color: var(--mute); }
.steps .step .dot {
    width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--mute);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 6px;
    font-weight: 700; border: 2px solid var(--border);
}
.steps .step.done .dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.steps .step.active .dot { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.steps .step.active { color: var(--primary); font-weight: 700; }
.steps .step:not(:last-child)::after {
    content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px;
    background: var(--border); z-index: -1;
}
.steps .step.done:not(:last-child)::after { background: var(--primary); }

/* ------------------------------------------------------------
   Panels
   ------------------------------------------------------------ */
.panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px;
    margin-bottom: 18px;
}
.panel h2 { font-size: 16px; margin: 0 0 12px; color: var(--text); }
.panel p, .panel td, .panel th { color: var(--text); }

.zone-list { display: flex; flex-direction: column; gap: 8px; }
.zone-group-title {
    font-size: 13px; font-weight: 700; color: var(--text); background: var(--surface-alt);
    padding: 8px 12px; border-radius: 4px; margin-top: 6px;
}
.zone-item-grouped { margin-left: 16px; }
.zone-item {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
}
.zone-item:hover { border-color: var(--primary); }
.zone-item.disabled { opacity: .5; }
.zone-item.disabled:hover { border-color: var(--border); }
.zone-color { width: 15px; height: 15px; border-radius: 3px; display: inline-block; margin-right: 8px; vertical-align: middle; }
.zone-name { font-weight: 700; }
.zone-price { color: var(--accent); font-weight: 700; margin-left: 10px; }
.zone-remain { font-size: 12px; margin-left: 10px; }
.zone-remain.is-available { color: var(--accent); font-weight: 700; }
.zone-remain.is-soldout { color: var(--mute); }

table.order-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.order-table th, table.order-table td {
    border: 1px solid var(--border); padding: 10px 12px; font-size: 13.5px; text-align: left;
}
table.order-table th { background: var(--surface-alt); font-weight: 700; }

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
    background: #fff4e5; border: 1px solid #ffdca3; color: #9a5b00;
    padding: 11px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: 13.5px;
}
.alert-info { background: #eaf1fc; border-color: #b9d3ff; color: var(--primary-dark); }
.alert-success { background: #e6f7ec; border-color: #b7ebc9; color: #1c7a43; }
.alert-countdown { background: #fde8e8; border-color: #f5c2c2; color: #c0392b; text-align: center; font-size: 14px; }
html[data-theme="dark"] .alert { background: #3a2c14; border-color: #5c4620; color: #f0c375; }
html[data-theme="dark"] .alert-info { background: #172a4a; border-color: #2c4a7c; color: #9fc0f5; }
html[data-theme="dark"] .alert-success { background: #163828; border-color: #235c3f; color: #7be0ab; }
html[data-theme="dark"] .alert-countdown { background: #3a1c1e; border-color: #5c2c2f; color: #f5a3a6; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-block; border: none; border-radius: var(--radius); padding: 9px 20px;
    font-size: 13.5px; cursor: pointer; font-weight: 700; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--surface); border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { background: var(--surface-alt); color: var(--mute); cursor: not-allowed; }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; margin-bottom: 5px; color: var(--mute); }
.form-row input[type=text], .form-row input[type=email], .form-row input[type=password],
.form-row select {
    width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.form-row input:focus, .form-row select:focus { border-color: var(--primary); outline: none; }
.radio-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.radio-line:last-child { border-bottom: none; }
.total-box { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 14px; font-size: 15px; }
.total-box .amount { font-size: 22px; color: var(--accent); font-weight: 700; }

.site-footer {
    text-align: center; padding: 22px; color: var(--mute); font-size: 12.5px;
    border-top: 1px solid var(--border); background: var(--surface); margin-top: 36px;
}
.site-footer a { color: var(--mute); }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer p:first-child { margin-bottom: 8px; }
.seat-map-note { font-size: 12px; color: var(--mute); margin-top: 8px; }

.countdown-chip {
    display: inline-block; background: var(--surface); border: 1px solid #ffdca3; color: #9a5b00; font-weight: 700;
    padding: 4px 12px; border-radius: 4px; font-size: 14px;
}
html[data-theme="dark"] .countdown-chip { border-color: #5c4620; color: #f0c375; }

/* ------------------------------------------------------------
   Loading spinner（系統配位中等待畫面）
   ------------------------------------------------------------ */
.spinner {
    width: 46px; height: 46px; margin: 0 auto;
    border: 5px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .page-wrap { padding: 16px 16px 60px; }
    .zone-price, .zone-remain { margin-left: 0; display: block; }
    .total-box { justify-content: space-between; }
}
