/* Nexa Sports 1.1.0：首頁新版區塊、發光線與四欄頁尾。只在有開啟任一新功能時才載入。顏色全部來自自訂器的主色／輔色。 */

/* 頁首／頁尾發光線（變數沒設定＝完全不作用） */
.nexa-header { border-bottom: var(--nexa-header-line, 0); box-shadow: var(--nexa-header-glow, none); }
.nexa-footer { border-top: var(--nexa-footer-line, 0); box-shadow: var(--nexa-footer-glow, none); }

/* 共用 */
.nexa-pv-block, .nexa-pv-hero { margin: 0 0 30px; }
.nexa-pv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.nexa-pv-title { display: flex; align-items: center; gap: 10px; }
.nexa-pv-title::before { content: ""; flex: none; width: 5px; height: 22px; background: var(--nexa-accent); box-shadow: var(--nexa-glow); border-radius: 2px; }
.nexa-pv-more { margin-left: auto; font-size: 14px; }
.nexa-pv-btn { display: inline-block; padding: 12px 30px; border-radius: 6px; background: var(--nexa-accent); color: #1a2133; font-size: 16px; font-weight: 700; line-height: 1.3; box-shadow: var(--nexa-glow); }
.nexa-pv-btn:hover, .nexa-pv-btn:focus { text-decoration: none; filter: brightness(.95); }
.nexa-pv-btn--sm { padding: 7px 20px; font-size: 14px; box-shadow: none; }
.nexa-pv-btn--ghost { display: block; padding: 7px 0; border: 1px solid var(--nexa-primary); background: none; color: var(--nexa-primary); box-shadow: none; font-size: 14px; text-align: center; }
.nexa-pv-btn--ghost:hover { background: var(--nexa-glow-faint); }

/* 主打橫幅 */
.nexa-pv-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: var(--nexa-phero-h, 420px); border-radius: var(--nexa-radius); color: #fff; background: radial-gradient(circle at 75% 50%, var(--nexa-glow-faint), transparent 55%), var(--nexa-primary); background-size: cover; background-position: center; }
.nexa-pv-hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 60px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 60px); pointer-events: none; }
.nexa-pv-hero.has-image::before { background: linear-gradient(90deg, rgba(0, 0, 0, .65), rgba(0, 0, 0, .15)); }
.nexa-pv-hero__inner { position: relative; display: flex; align-items: center; gap: 30px; width: 100%; padding: 34px 40px; }
.nexa-pv-hero__copy { flex: 1 1 auto; min-width: 0; }
.nexa-pv-badge { display: inline-block; margin-bottom: 14px; padding: 3px 12px; border: 1px solid var(--nexa-accent); border-radius: 3px; color: var(--nexa-accent); font-size: 14px; }
.nexa-pv-hero__title { margin: 0; font-size: clamp(28px, 4vw, 46px); line-height: 1.2; font-weight: 900; color: #fff; }
.nexa-pv-hero__title em { color: var(--nexa-accent); font-style: normal; text-shadow: var(--nexa-glow-text); }
.nexa-pv-hero__text { max-width: 560px; margin: 16px 0 24px; color: #dfe4ee; font-size: 17px; }
.nexa-pv-card { flex: none; display: flex; flex-direction: column; gap: 6px; width: min(340px, 100%); padding: 26px; border: 2px solid var(--nexa-accent); border-radius: 14px; background: var(--nexa-surface); color: var(--nexa-text); box-shadow: var(--nexa-glow); text-align: center; }
a.nexa-pv-card:hover { text-decoration: none; }
.nexa-pv-card__name { font-size: 20px; font-weight: 700; }
.nexa-pv-card__big { color: var(--nexa-primary); font-size: 56px; font-weight: 900; line-height: 1.1; }
.nexa-pv-card__sub { color: var(--nexa-muted); }
.nexa-pv-card__rate { margin-top: 6px; font-size: 20px; font-weight: 700; }
.nexa-pv-stars { color: #e0a100; letter-spacing: 1px; }
.nexa-pv-stars__off { opacity: .25; }

/* 排行榜 */
.nexa-pv-table { border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); box-shadow: var(--nexa-shadow); overflow: hidden; }
.nexa-pv-tr { display: grid; grid-template-columns: 70px minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 2.6fr) 90px; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--nexa-border); font-size: 15px; }
.nexa-pv-th { border-top: 0; background: var(--nexa-primary); color: #fff; font-size: 14px; font-weight: 700; }
.nexa-pv-rk { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #dfe4ee; color: var(--nexa-text); font-weight: 900; }
.nexa-pv-rk--1 { background: var(--nexa-accent); color: #1a2133; box-shadow: var(--nexa-glow); }
.nexa-pv-rk--2, .nexa-pv-rk--3 { background: var(--nexa-primary); color: #fff; }
.nexa-pv-c2 { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nexa-pv-logo { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--nexa-primary); color: #fff; font-weight: 900; overflow: hidden; }
.nexa-pv-logo img { width: 100%; height: 100%; object-fit: cover; }
.nexa-pv-c3 b { margin-left: 4px; }
.nexa-pv-cbtn { text-align: right; }

/* 今日熱門賽事 */
.nexa-pv-game-grid { display: grid; grid-template-columns: repeat(var(--nexa-pgames-cols, 4), minmax(0, 1fr)); gap: 16px; }
.nexa-pv-game { padding: 16px; border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); box-shadow: var(--nexa-shadow); }
.nexa-pv-game__top { display: flex; justify-content: space-between; color: var(--nexa-muted); font-size: 13px; }
.nexa-pv-tag { padding: 1px 8px; border: 1px solid var(--nexa-primary); border-radius: 3px; background: var(--nexa-glow-faint); color: var(--nexa-primary); font-size: 12px; }
.nexa-pv-vs { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; text-align: center; }
.nexa-pv-vs i { color: var(--nexa-accent); font-style: normal; font-weight: 900; text-shadow: var(--nexa-glow-text); }
.nexa-pv-side { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 90px; }
.nexa-pv-side img, .nexa-pv-noimg { width: 56px; height: 56px; object-fit: contain; }
.nexa-pv-noimg { display: grid; place-items: center; border-radius: 50%; background: #dfe4ee; color: var(--nexa-primary); font-weight: 900; font-size: 22px; }
.nexa-pv-side b { font-size: 14px; overflow-wrap: anywhere; }

/* 熱門分類方塊 */
.nexa-pv-cat-grid { display: grid; grid-template-columns: repeat(var(--nexa-pcats-cols, 9), minmax(0, 1fr)); gap: 12px; }
.nexa-pv-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); color: var(--nexa-text); text-align: center; transition: border-color .2s, box-shadow .2s; }
.nexa-pv-cat:hover { border-color: var(--nexa-accent); box-shadow: var(--nexa-glow); text-decoration: none; }
.nexa-pv-cat__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--nexa-primary); color: #fff; font-size: 20px; font-weight: 800; line-height: 1; }
.nexa-pv-cat b { min-height: 2.6em; font-size: 14px; }
.nexa-pv-cat small { color: var(--nexa-muted); font-size: 12px; }

/* 球隊入口（聯盟分頁） */
.nexa-pv-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.nexa-pv-tab { padding: 9px 28px; border: 1px solid var(--nexa-border); border-radius: 6px; background: var(--nexa-surface); color: var(--nexa-text); font: inherit; font-weight: 700; cursor: pointer; }
.nexa-pv-tab.is-on { border-color: var(--nexa-primary); background: var(--nexa-primary); color: #fff; box-shadow: var(--nexa-glow); }
.nexa-pv-teams.is-js .nexa-pv-panel { display: none; }
.nexa-pv-teams.is-js .nexa-pv-panel.is-on { display: block; }
.nexa-pv-team-grid { display: grid; grid-template-columns: repeat(var(--nexa-pteams-cols, 6), minmax(0, 1fr)); gap: 14px; }
.nexa-pv-team { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 12px; border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); color: var(--nexa-text); text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.nexa-pv-team:hover { border-color: var(--nexa-accent); box-shadow: var(--nexa-glow), inset 0 0 12px var(--nexa-glow-faint); transform: translateY(-4px); text-decoration: none; }
a.nexa-pv-team:hover b { color: var(--nexa-primary); }
.nexa-pv-team__logo { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: #eef1f6; color: var(--nexa-primary); font-size: 26px; font-weight: 900; overflow: hidden; }
.nexa-pv-team__logo img { width: 54px; height: 54px; object-fit: contain; }
.nexa-pv-team b { font-size: 15px; }
.nexa-pv-teams.is-js .nexa-pv-panel:not(.is-open) .is-extra { display: none; }
.nexa-pv-toggle { display: block; margin: 18px auto 0; border: 0; background: none; color: var(--nexa-primary); font: inherit; font-weight: 700; cursor: pointer; }

/* 最新文章＋熱門側欄 */
.nexa-pv-latest__layout { display: block; }
.nexa-pv-latest__grid { display: grid; grid-template-columns: repeat(var(--nexa-platest-cols, 2), minmax(0, 1fr)); gap: var(--nexa-gap); }
.nexa-pv-hot { margin-top: 22px; padding: 16px 18px; border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); box-shadow: var(--nexa-shadow); }
.nexa-pv-hot__title { margin: 0 0 8px; font-size: 18px; color: var(--nexa-primary); }
@media (min-width: 1024px) {
	.nexa-pv-latest__layout.has-hot { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
	.nexa-pv-latest__layout.has-hot .nexa-pv-hot { margin-top: 0; }
}

/* 四欄頁尾（用在深色頁尾上） */
.nexa-footer4 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.nexa-footer4__name { color: #fff; font-size: 26px; font-weight: 900; }
.nexa-footer4__name:hover { text-decoration: none; }
.nexa-footer4__name .custom-logo { max-height: 48px; width: auto; display: block; }
.nexa-footer4__brand p { margin: 10px 0 0; line-height: 1.9; }
.nexa-footer4__col ul { margin: 0; padding: 0; list-style: none; line-height: 2; }

@media (max-width: 1023px) {
	.nexa-pv-hero__inner { flex-direction: column; align-items: flex-start; }
	.nexa-pv-game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nexa-pv-cat-grid, .nexa-pv-team-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.nexa-footer4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
	.nexa-pv-hero__inner { padding: 26px 20px; }
	.nexa-pv-tr { grid-template-columns: 44px minmax(0, 1fr) 70px; }
	.nexa-pv-th { display: none; }
	.nexa-pv-c3, .nexa-pv-c4 { grid-column: 2 / 3; }
	.nexa-pv-cbtn { grid-column: 3; grid-row: 1 / span 3; }
	.nexa-pv-game-grid, .nexa-pv-latest__grid { grid-template-columns: minmax(0, 1fr); }
	.nexa-pv-cat-grid, .nexa-pv-team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.nexa-footer4 { grid-template-columns: 1fr; }
}
/* 聯盟分頁的「台灣彩券」分頁：卡片沿用聯盟卡片（.nexa-pv-team）的外框、底色、陰影與懸停光暈 */
.nexa-pv-lotto-grid { display: grid; grid-template-columns: repeat(var(--nexa-plotto-cols, 4), minmax(0, 1fr)); gap: 14px; }
.nexa-pv-lotto { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 14px; border: 1px solid var(--nexa-border); border-radius: var(--nexa-radius); background: var(--nexa-surface); color: var(--nexa-text); text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.nexa-pv-lotto:hover { border-color: var(--nexa-accent); box-shadow: var(--nexa-glow), inset 0 0 12px var(--nexa-glow-faint); transform: translateY(-4px); text-decoration: none; }
a.nexa-pv-lotto:hover .nexa-pv-lotto__name { color: var(--nexa-primary); }
.nexa-pv-lotto__name { font-size: 17px; }
.nexa-pv-lotto__period, .nexa-pv-lotto__date { color: var(--nexa-muted); font-size: 13px; }
.nexa-pv-lotto__balls { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.nexa-pv-ball { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 2px; border-radius: 50%; background: var(--nexa-primary); color: #fff; font-style: normal; font-size: 13px; font-weight: 700; }
.nexa-pv-ball--special { background: #b3261e; }
.nexa-pv-lotto__empty { padding: 14px 0; color: var(--nexa-muted); font-size: 14px; }
@media (max-width: 1023px) {
	.nexa-pv-lotto-grid { grid-template-columns: repeat(min(var(--nexa-plotto-cols, 4), 2), minmax(0, 1fr)); }
}
@media (max-width: 639px) {
	.nexa-pv-lotto-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.nexa-pv-team, .nexa-pv-cat, .nexa-pv-lotto { transition: none; }
	a.nexa-pv-team:hover, a.nexa-pv-lotto:hover { transform: none; }
}
