/* 2026 SUMMER一下 ｜ 排球 × 烤鴨西瓜盃 - 全站樣式表 */

/* 匯入 Google 字型 */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,300;0,400;0,600;0,700;1,600&family=Barlow:wght@300;400;500;600;700&display=swap');

/* 全域 CSS 變數 */
:root {
  --bg-dark: #070b11;
  --bg-deep: #0b1219;
  --bg-card: rgba(17, 26, 36, 0.75);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(6, 182, 212, 0.3);
  
  --primary: #06b6d4;      /* 霓虹藍/青 */
  --primary-glow: rgba(6, 182, 212, 0.4);
  --secondary: #10b981;    /* 西瓜綠 */
  --secondary-glow: rgba(16, 185, 129, 0.3);
  --watermelon-red: #ef4444; /* 西瓜紅 */
  --roast-duck: #f59e0b;   /* 烤鴨金/黃 */
  
  --text-primary: #f8fafc;
  --text-muted: #94a3b8;
  
  --font-sports: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Bebas Neue', 'Noto Sans TC', sans-serif;
  --color-bg: var(--bg-dark);
  --color-surface: var(--bg-card);
  --color-border: var(--border-card);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-muted);
  --color-text-faint: rgba(148, 163, 184, 0.72);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.2);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* 重設樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 50% 0%, #0f1c2b 0%, var(--bg-dark) 80%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 80px; /* 給固定導覽列留空間 */
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* 捲軸美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* 共用元件與容器 */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 玻璃卡片 */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  transition: var(--transition-smooth);
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.15);
}

/* 標題與字型 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sports);
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.sports-text {
  font-family: var(--font-sports);
}

.section-title {
  font-size: 2.5rem;
  text-transform: uppercase;
  margin-bottom: 32px;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}

/* 徽章與狀態標籤 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-watermelon {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-duck {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-primary {
  background: rgba(6, 182, 212, 0.15);
  color: #a5f3fc;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 按鈕樣式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
  color: #04080f;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--watermelon-red) 0%, #b91c1c 100%);
  color: white;
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.admin-only {
  display: none;
}

/* 導覽列 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: rgba(7, 11, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-card);
  z-index: 100;
  transition: var(--transition-smooth);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--watermelon-red) 0%, var(--roast-duck) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
  font-size: 1.5rem;
}

.logo-icon-image {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  padding: 2px;
}

.logo-icon-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.nav-logo > .logo-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(20, 184, 166, 0.22), 0 4px 16px rgba(239, 68, 68, 0.18);
}

.nav-logo > .logo-icon img {
  border-radius: 14px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* 導覽連結 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-link:hover, .nav-item.active .nav-link {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active .nav-link {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  border-radius: 8px 8px 0 0;
}

/* 下拉選單 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(11, 18, 25, 0.95);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 8px;
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.dropdown-item:hover {
  color: var(--primary);
  background: rgba(6, 182, 212, 0.08);
}

/* 手機版漢堡按鈕 */
.nav-hamburger {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* --- 首頁頁面 (#home) --- */
.hero-section {
  --hero-bg-image: url("assets/volleyball-court-hero.jpeg");
  --hero-bg-opacity: 0.86;
  text-align: center;
  padding: 66px 24px 108px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  perspective: 1200px;
  min-height: 520px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 11, 17, 0.18) 0%, rgba(7, 11, 17, 0.42) 100%),
    var(--hero-bg-image) center 42% / cover no-repeat;
  opacity: var(--hero-bg-opacity);
  z-index: -3;
}

/* Dynamic Animated Background Wrapper */
.hero-animated-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Animated Mesh Gradient Layer */
.hero-mesh-glow {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: meshGradientShift 20s ease infinite;
  z-index: -2;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.85;
  width: 100%;
  height: 100%;
}

.hero-floating-elements {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Floating Elements Styling */
.float-item {
  position: absolute;
  display: inline-block;
  font-size: 2.2rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  opacity: 0.45;
  user-select: none;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.float-item:hover {
  opacity: 0.9;
  filter: drop-shadow(0 12px 24px rgba(6, 182, 212, 0.6));
}

.float-item-1 {
  top: 15%;
  left: 8%;
  font-size: 2.4rem;
  animation: floatAnim1 16s ease-in-out infinite;
}

.float-item-2 {
  top: 62%;
  left: 6%;
  font-size: 2.8rem;
  animation: floatAnim2 22s ease-in-out infinite;
}

.float-item-3 {
  top: 22%;
  right: 10%;
  font-size: 2.6rem;
  animation: floatAnim3 18s ease-in-out infinite;
}

.float-item-4 {
  top: 68%;
  right: 12%;
  font-size: 2.3rem;
  animation: floatAnim4 15s ease-in-out infinite;
}

.float-item-5 {
  top: 10%;
  left: 55%;
  font-size: 1.8rem;
  opacity: 0.3;
  animation: floatAnim1 24s ease-in-out infinite;
}

.float-item-6 {
  top: 75%;
  left: 45%;
  font-size: 2.0rem;
  opacity: 0.35;
  animation: floatAnim2 20s ease-in-out infinite;
}

/* Click interactions */
.float-item.spin-active {
  animation: clickSpinEffect 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.float-item.pop-active {
  animation: clickPopEffect 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* Content Container Card (Glassmorphism) */
.hero-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 42px 48px;
  background:
    radial-gradient(ellipse at center, rgba(7, 11, 17, 0.36) 0%, rgba(7, 11, 17, 0.22) 48%, rgba(7, 11, 17, 0.04) 78%, transparent 100%),
    linear-gradient(180deg, rgba(7, 11, 17, 0.14), rgba(7, 11, 17, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 
    0 18px 42px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hero-content-wrapper::before {
  content: "";
  position: absolute;
  inset: 22px 34px;
  z-index: 0;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(3, 7, 18, 0.42) 0%, rgba(3, 7, 18, 0.18) 48%, transparent 74%);
  filter: blur(18px);
  pointer-events: none;
}

.hero-content-wrapper:hover {
  box-shadow: 
    0 22px 48px rgba(0, 0, 0, 0.22),
    0 0 28px rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.25);
}

/* Brand Badge Emblem */
.hero-brand-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  background: rgba(7, 11, 17, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  padding: 6px 18px 6px 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateZ(30px);
  backface-visibility: hidden;
}

.hero-brand-badge .badge-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--watermelon-red) 0%, var(--roast-duck) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
  animation: logoPulse 3s ease-in-out infinite;
}

.hero-brand-badge .badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.hero-brand-badge .badge-main {
  font-family: var(--font-sports);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 1px;
}

.hero-brand-badge .badge-sub {
  font-size: 0.62rem;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.hero-tagline {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  color: var(--watermelon-red);
  letter-spacing: 3px;
  margin-bottom: 12px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 12px rgba(239, 68, 68, 0.45);
  text-transform: uppercase;
  transform: translateZ(25px);
}

.hero-title {
  position: relative;
  z-index: 1;
  font-size: clamp(2.25rem, 8.6vw, 4.8rem);
  font-family: var(--font-sports);
  line-height: 1.05;
  margin-bottom: 22px;
  text-transform: uppercase;
  white-space: nowrap;
  background: linear-gradient(135deg, #ffffff 40%, var(--primary) 75%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,0.58));
  transform: translateZ(45px);
  font-weight: 700;
}

.hero-sub {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  color: rgba(226, 232, 240, 0.92);
  max-width: 620px;
  margin: 0 auto 38px;
  line-height: 1.65;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.68);
  transform: translateZ(20px);
}

.hero-cta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  transform: translateZ(35px);
}

.hero-cta .btn {
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.hero-cta .btn-draw-entry {
  min-width: 180px;
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.55);
  box-shadow:
    0 8px 28px rgba(6, 182, 212, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.registration-closed-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  color: var(--roast-duck);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.12);
  cursor: default;
  user-select: none;
}

.hero-cta .btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
  border: none;
}

.hero-cta .btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 
    0 8px 30px var(--primary-glow),
    0 0 15px rgba(16, 185, 129, 0.4);
}

.hero-cta .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.hero-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Animations Keyframes */
@keyframes meshGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55), 0 0 12px rgba(245, 158, 11, 0.3); }
}

@keyframes floatAnim1 {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-24px) rotate(15deg) scale(1.06); }
}

@keyframes floatAnim2 {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(28px) rotate(-18deg) scale(0.94); }
}

@keyframes floatAnim3 {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-20px) rotate(12deg) scale(1.04); }
}

@keyframes floatAnim4 {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(22px) rotate(-15deg) scale(1.08); }
}

@keyframes clickSpinEffect {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(360deg) scale(1.4); }
}

@keyframes clickPopEffect {
  0% { transform: scale(1); }
  50% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 32px 16px 64px;
    min-height: auto;
  }
  .hero-content-wrapper {
    padding: 30px 18px;
    border-radius: 20px;
  }
  .hero-title {
    font-size: clamp(2rem, 10.2vw, 3rem);
    margin-bottom: 18px;
  }
  .hero-tagline {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }
  .hero-sub {
    font-size: 1.02rem;
    margin-bottom: 22px;
  }
  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }
  .hero-cta .btn,
  .registration-closed-label {
    width: 100%;
  }
  .float-item {
    font-size: 1.6rem !important;
  }
  .float-item-5, .float-item-6 {
    display: none;
  }
}

.hero-bg-admin-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  margin: 16px 0 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.hero-bg-preview {
  min-height: 112px;
  border-radius: 8px;
  background-image:
    linear-gradient(180deg, rgba(10, 20, 32, 0.42), rgba(10, 20, 32, 0.58)),
    var(--hero-bg-preview-image, url("assets/volleyball-court-hero.jpeg"));
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-opacity-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.hero-opacity-control input[type="range"] {
  width: 100%;
}

.hero-opacity-value {
  min-width: 52px;
  color: var(--primary);
  font-weight: 700;
  text-align: right;
}

/* 首頁資訊網格 */
.home-grid {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 32px;
  margin-bottom: 60px;
}

.home-left-col, .home-right-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 卡片內元素樣式 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 最新公告列表 */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement-item {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  padding-bottom: 8px;
}

.ann-date {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.ann-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.ann-content {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.announcement-main-image {
  display: block;
  width: min(100%, 560px);
  max-height: 320px;
  margin: 10px 0;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.announcement-edit-mode {
  margin-top: 8px;
}

.announcement-edit-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

#announcements-edit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-image-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.announcement-image-editor-actions {
  display: flex;
  gap: 8px;
}

.announcement-image-file-label {
  cursor: pointer;
}

.announcement-image-preview {
  grid-column: 1 / -1;
  width: min(100%, 360px);
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.announcement-image-preview.is-empty {
  display: none;
}

@media (max-width: 640px) {
  .announcement-image-editor {
    grid-template-columns: 1fr;
  }
}

/* 活動簡介與西瓜烤鴨主題 */
.intro-text-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-paragraph {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.activity-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 10px;
}

.meta-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.meta-icon {
  font-size: 2rem;
  color: var(--primary);
}

.meta-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-value {
  font-size: 1.1rem;
  font-weight: 600;
}

/* 報名現況表格 */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.stats-table th, .stats-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-table th {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
}

.stats-table td {
  font-family: var(--font-sports);
  font-size: 1.35rem;
  font-weight: 600;
}

.stats-overall-summary {
  display: flex;
  justify-content: space-around;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-item {
  text-align: center;
}

.summary-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-num {
  font-family: var(--font-sports);
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 700;
}

/* 行事曆 Calendar */
.calendar-widget {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 600;
}

.calendar-month {
  font-family: var(--font-sports);
  font-size: 1.2rem;
  color: var(--primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.cal-day-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 8px;
}

.cal-date {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-muted);
}

.cal-date.active-month {
  color: var(--text-primary);
}

.cal-date.today {
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.cal-date.event-highlight {
  background: rgba(239, 68, 68, 0.2);
  color: var(--watermelon-red);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.cal-date.event-today {
  background: linear-gradient(135deg, var(--watermelon-red) 0%, var(--primary) 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* 行事曆日程事件 */
.calendar-events {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-item {
  display: flex;
  gap: 16px;
  font-size: 0.88rem;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.event-item:last-child {
  border: none;
  padding-bottom: 0;
}

.event-time {
  font-family: var(--font-sports);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.event-desc {
  color: var(--text-primary);
}

/* 預定參賽隊伍輪播/網格 */
.registered-teams-widget {
  margin-top: 32px;
}

.teams-marquee {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.team-card-mini {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
}

.team-card-mini:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.team-avatar-mini {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-name-mini {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-status-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* 模擬 FB 粉絲團卡片 */
.fb-widget {
  background: var(--bg-card);
}

.fb-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.fb-page-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0284c7 0%, var(--primary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.fb-page-info {
  display: flex;
  flex-direction: column;
}

.fb-page-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.fb-page-likes {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fb-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.fb-post {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.fb-post-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 8px;
}

.fb-post-text {
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.fb-post-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* --- 競賽章程頁面 (#rules) --- */
.rules-wrapper {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rules-heading-card {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(239, 68, 68, 0.15);
}

.why-attend-section {
  margin-top: 24px;
}

.why-attend-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.why-box {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 16px;
  border-left: 3px solid var(--watermelon-red);
}

.why-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.why-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 摺疊面板 Accordion */
.accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accordion-item:last-child {
  border: none;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: left;
}

.accordion-trigger:hover {
  color: var(--primary);
}

.accordion-icon {
  transition: var(--transition-smooth);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content-inner {
  padding-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.accordion-content-inner ol, .accordion-content-inner ul {
  padding-left: 20px;
  margin: 12px 0;
}

.accordion-content-inner li {
  margin-bottom: 8px;
}

/* --- 線上報名頁面 (#register) --- */
.register-layout {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 32px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-btn {
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  color: var(--text-muted);
}

.sidebar-btn:hover, .sidebar-btn.active {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-btn.active {
  background: rgba(6, 182, 212, 0.08);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
}

.register-content-card {
  min-height: 500px;
}

.register-subpage {
  display: none;
}

.register-subpage.active {
  display: block;
}

/* 表單元件 */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* 報名球員清單動態輸入區 */
.players-input-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.players-table {
  width: 100%;
  border-collapse: collapse;
}

.players-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-bottom: 12px;
}

.player-input-row {
  animation: fadeIn 0.3s ease;
}

.player-input-row td {
  padding: 8px 0;
  padding-right: 12px;
}

.player-input-row td:last-child {
  padding-right: 0;
}

.player-remove-btn {
  color: var(--watermelon-red);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
  transition: var(--transition-fast);
}

.player-remove-btn:hover {
  opacity: 1;
}

/* 表單成功發佈 */
.success-screen {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--secondary);
  margin: 0 auto 24px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.code-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  max-width: 320px;
  margin: 20px auto;
}

.confirm-code {
  font-family: var(--font-sports);
  font-size: 2rem;
  font-weight: 700;
  color: var(--roast-duck);
  letter-spacing: 2px;
}

/* 我的隊伍管理面版 */
.team-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 20px;
}

.dashboard-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 參賽隊伍與名單列表 */
.team-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.team-card-info {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  transition: var(--transition-smooth);
}

.team-card-info:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.team-name-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.team-card-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-card-action {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  text-align: right;
}

/* 參賽名單（球員名單詳細展開） */
.players-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.players-list-team-card {
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.team-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.player-badge-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-badge-num {
  font-family: var(--font-sports);
  font-size: 1.5rem;
  font-weight: 700;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.player-badge-info {
  display: flex;
  flex-direction: column;
}

.player-badge-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.player-badge-pos {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- 總成績與賽程頁面 (#results) --- */
.results-header-row {
  gap: 16px;
}

.results-staff-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.results-sync-status {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.results-sync-status[data-tone="success"] {
  border-color: rgba(16, 185, 129, 0.32);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
}

.results-sync-status[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.results-staff-login-card {
  margin-bottom: 18px;
}

.results-staff-login-copy {
  max-width: 720px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.results-staff-login-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.results-edit-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.06);
}

.results-edit-toolbar p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.results-edit-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.results-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.results-tab-btn {
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-fast);
}

.results-tab-btn:hover, .results-tab-btn.active {
  background: var(--primary);
  color: #04080f;
  border-color: var(--primary);
}

.results-subpage {
  display: none;
}

.results-subpage.active {
  display: block;
}

/* MVP Selection Matrix：所有功能樣式均限制於 mvp-matrix namespace。 */
.mvp-matrix-shell {
  --mvp-accent: #d9f99d;
  --mvp-cyan: #67e8f9;
  --mvp-danger: #fca5a5;
  color: #f8fafc;
  display: grid;
  gap: 22px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.mvp-matrix-header,
.mvp-matrix-chart-card,
.mvp-matrix-index-card,
.mvp-matrix-dimensions,
.mvp-matrix-evidence,
.mvp-matrix-transparency,
.mvp-matrix-methodology,
.mvp-matrix-leaderboard,
.mvp-matrix-admin {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: #08111d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.mvp-matrix-header {
  padding: clamp(22px, 4vw, 42px);
  background: #0a1422;
}

.mvp-matrix-eyebrow {
  display: block;
  color: var(--mvp-accent);
  font-family: var(--font-sports);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.mvp-matrix-header h3 {
  margin: 8px 0 4px;
  font-family: var(--font-sports);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  line-height: 1.16;
}

.mvp-matrix-subtitle {
  color: var(--mvp-cyan);
  font-weight: 700;
  margin: 0 0 20px;
}

.mvp-matrix-preview-note {
  max-width: 780px;
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--mvp-accent);
  background: rgba(217, 249, 157, 0.06);
  color: #cbd5e1;
  line-height: 1.65;
}

.mvp-matrix-selector {
  display: grid;
  grid-template-columns: auto minmax(220px, 440px);
  gap: 12px;
  align-items: center;
  justify-content: end;
}

.mvp-matrix-selector label {
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 700;
}

.mvp-matrix-source {
  justify-self: start;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.mvp-matrix-source-preview { color: var(--mvp-accent); border-color: rgba(217, 249, 157, 0.45); }
.mvp-matrix-source-manual { color: #fcd34d; border-color: rgba(252, 211, 77, 0.45); }
.mvp-matrix-source-technical { color: var(--mvp-cyan); border-color: rgba(103, 232, 249, 0.45); }

.mvp-matrix-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.mvp-matrix-chart-card,
.mvp-matrix-index-card,
.mvp-matrix-dimensions,
.mvp-matrix-evidence,
.mvp-matrix-transparency,
.mvp-matrix-methodology,
.mvp-matrix-leaderboard {
  padding: clamp(18px, 3vw, 28px);
}

.mvp-matrix-radar {
  display: block;
  width: min(100%, 500px);
  margin: 0 auto;
  overflow: hidden;
}

.mvp-matrix-radar-grid {
  fill: rgba(103, 232, 249, 0.015);
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.mvp-matrix-radar-axis { stroke: rgba(148, 163, 184, 0.25); stroke-width: 1; }
.mvp-matrix-radar-level { fill: #94a3b8; font-size: 7px; }
.mvp-matrix-radar-label { fill: #e2e8f0; font-size: 9px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.mvp-matrix-radar-value { fill: rgba(217, 249, 157, 0.18); stroke: var(--mvp-accent); stroke-width: 2.5; }
.mvp-matrix-radar-dot { fill: var(--mvp-cyan); stroke: #08111d; stroke-width: 2; }

.mvp-matrix-index-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.mvp-matrix-index-kicker { color: var(--mvp-cyan); font-size: 0.78rem; font-weight: 800; }
.mvp-matrix-index-card h4 { margin: 8px 0 0; font-size: 1.55rem; }
.mvp-matrix-index-card > p { color: #94a3b8; }
.mvp-matrix-index-value { margin-top: 18px; color: var(--mvp-accent); font-family: var(--font-sports); font-size: clamp(3.2rem, 8vw, 5.2rem); font-weight: 800; line-height: 1; }
.mvp-matrix-index-value small { color: #94a3b8; font-size: 1rem; }
.mvp-matrix-index-disclaimer { border-top: 1px solid rgba(148, 163, 184, 0.16); padding-top: 14px; font-size: 0.82rem; line-height: 1.55; }

.mvp-matrix-sample {
  width: 100%;
  margin: 18px 0 4px;
}

.mvp-matrix-sample div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mvp-matrix-sample dt { color: #94a3b8; }
.mvp-matrix-sample dd { margin: 0; color: #f8fafc; font-weight: 700; text-align: right; }

.mvp-matrix-dimensions h4,
.mvp-matrix-evidence h4,
.mvp-matrix-leaderboard h4 { margin: 0 0 18px; font-size: 1.2rem; }

.mvp-matrix-dimension-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1.2fr);
  gap: 22px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mvp-matrix-dimension-copy strong { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.mvp-matrix-dimension-copy strong span { color: #94a3b8; font-size: 0.66rem; letter-spacing: 0.08em; }
.mvp-matrix-dimension-copy p { margin: 5px 0 0; color: #94a3b8; font-size: 0.84rem; }
.mvp-matrix-dimension-metrics { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.mvp-matrix-weight { color: var(--mvp-cyan); font-size: 0.78rem; font-weight: 800; }
.mvp-matrix-score { color: #f8fafc; font-weight: 800; text-align: right; }
.mvp-matrix-progress { grid-column: 1 / -1; height: 9px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.16); }
.mvp-matrix-progress span { display: block; height: 100%; border-radius: inherit; background: var(--mvp-accent); transition: width 220ms ease; }

.mvp-matrix-evidence > div { display: flex; flex-wrap: wrap; gap: 9px; }
.mvp-matrix-evidence > div span { padding: 7px 10px; border-radius: 999px; background: rgba(103, 232, 249, 0.08); border: 1px solid rgba(103, 232, 249, 0.24); color: #cffafe; font-size: 0.8rem; }
.mvp-matrix-evidence blockquote { margin: 18px 0 0; padding: 14px 18px; border-left: 3px solid var(--mvp-cyan); color: #e2e8f0; background: rgba(103, 232, 249, 0.05); line-height: 1.65; }

.mvp-matrix-transparency { border-color: rgba(217, 249, 157, 0.3); }
.mvp-matrix-transparency strong { color: var(--mvp-accent); }
.mvp-matrix-transparency p { margin: 7px 0 0; color: #cbd5e1; line-height: 1.65; }
.mvp-matrix-official-note { padding-top: 12px; border-top: 1px solid rgba(148, 163, 184, 0.14); font-weight: 700; }
.mvp-matrix-methodology summary { cursor: pointer; color: var(--mvp-cyan); font-weight: 800; }
.mvp-matrix-methodology summary:focus-visible { outline: 3px solid var(--mvp-accent); outline-offset: 4px; }
.mvp-matrix-methodology p { color: #cbd5e1; line-height: 1.65; }

.mvp-matrix-leaderboard table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.mvp-matrix-leaderboard th,
.mvp-matrix-leaderboard td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, 0.14); text-align: left; }
.mvp-matrix-leaderboard th { color: #94a3b8; font-size: 0.78rem; }
.mvp-matrix-leaderboard > p { color: #fcd34d; }

.mvp-matrix-admin { padding: clamp(16px, 3vw, 28px); border-color: rgba(103, 232, 249, 0.35); display: grid; gap: 20px; }
.mvp-matrix-admin-banner { padding: 18px; border-radius: 10px; background: rgba(103, 232, 249, 0.06); }
.mvp-matrix-admin-banner h3 { margin: 5px 0; }
.mvp-matrix-admin-banner p { margin: 0; color: #cbd5e1; line-height: 1.55; }
.mvp-matrix-admin-section { padding: clamp(16px, 3vw, 24px); border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 12px; background: #0b1725; }
.mvp-matrix-admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.mvp-matrix-admin-heading h4 { margin: 4px 0 0; }
.mvp-matrix-admin-form { display: grid; gap: 18px; margin-top: 18px; }
.mvp-identity-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mvp-identity-summary span { border: 1px solid rgba(103, 232, 249, 0.35); border-radius: 999px; padding: 5px 10px; color: #bae6fd; font-size: 0.8rem; font-weight: 700; }
.mvp-identity-admin .mvp-matrix-warning ul { margin: 8px 0 0; padding-left: 20px; }
.mvp-identity-ok { color: #86efac; font-weight: 700; }
.mvp-matrix-score-editor { display: grid; gap: 10px; }
.mvp-matrix-score-input { display: grid; grid-template-columns: 1fr 100px; gap: 16px; align-items: center; }
.mvp-matrix-score-input small { display: block; margin-top: 3px; color: #94a3b8; font-weight: 400; }
.mvp-matrix-evidence-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.mvp-matrix-stat-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mvp-matrix-stat-editor fieldset { min-width: 0; padding: 14px; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 9px; }
.mvp-matrix-stat-editor legend { padding: 0 8px; color: var(--mvp-cyan); font-weight: 800; }
.mvp-matrix-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mvp-matrix-stat-grid label { color: #cbd5e1; font-size: 0.78rem; }
.mvp-matrix-stat-grid input { margin-top: 4px; }
.mvp-matrix-warning { color: #fecaca; padding: 10px 12px; border: 1px solid rgba(252, 165, 165, 0.3); border-radius: 8px; background: rgba(127, 29, 29, 0.2); }

.mvp-matrix-shell button:focus-visible,
.mvp-matrix-shell select:focus-visible,
.mvp-matrix-shell input:focus-visible,
.mvp-matrix-shell textarea:focus-visible {
  outline: 3px solid var(--mvp-accent);
  outline-offset: 2px;
}

.results-tab-btn:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .mvp-matrix-hero,
  .mvp-matrix-dimension-row,
  .mvp-matrix-selector,
  .mvp-matrix-stat-editor {
    grid-template-columns: 1fr;
  }

  .mvp-matrix-selector { justify-content: stretch; }
  .mvp-matrix-dimension-metrics { grid-template-columns: 1fr; }
  .mvp-matrix-score { text-align: left; }
  .mvp-matrix-progress { grid-column: 1; }
  .mvp-matrix-admin-heading { align-items: stretch; flex-direction: column; }
  .mvp-matrix-score-input { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .mvp-matrix-shell { gap: 14px; }
  .mvp-matrix-header,
  .mvp-matrix-chart-card,
  .mvp-matrix-index-card,
  .mvp-matrix-dimensions,
  .mvp-matrix-evidence,
  .mvp-matrix-transparency,
  .mvp-matrix-methodology,
  .mvp-matrix-leaderboard,
  .mvp-matrix-admin { border-radius: 10px; padding: 15px; }
  .mvp-matrix-radar-label { font-size: 8px; }
  .mvp-matrix-evidence-input,
  .mvp-matrix-stat-grid { grid-template-columns: 1fr; }
  .mvp-matrix-evidence-input button { width: 100%; }
}

@media (max-width: 480px) {
  .results-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .results-tab-btn {
    min-width: 0;
    padding: 9px 10px;
    white-space: normal;
    line-height: 1.35;
  }

  .mvp-matrix-header h3 {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mvp-matrix-progress span { transition: none; }
}

/* 循環賽積分表 */
.results-table-container {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.standings-table th, .standings-table td {
  padding: 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.standings-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.standings-rank {
  font-family: var(--font-sports);
  font-size: 1.25rem;
  font-weight: 700;
}

.standings-rank-1 { color: #f59e0b; } /* 第一名金黃色 */
.standings-rank-2 { color: #cbd5e1; } /* 第二名銀灰色 */
.standings-rank-3 { color: #b45309; } /* 第三名銅褐色 */

/* 對戰時程表 */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.matches-empty-state {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 32px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.matches-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.24);
  font-size: 1.7rem;
}

.matches-empty-state h4 {
  font-size: 1.35rem;
  color: var(--primary);
}

.matches-empty-state p {
  max-width: 520px;
  color: var(--text-muted);
}

.match-item-card {
  background: rgba(17, 26, 36, 0.6);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.match-item-card:hover {
  border-color: var(--border-hover);
}

.match-meta-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-time-tag {
  font-family: var(--font-sports);
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
}

.match-court-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.match-status-pill {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.match-status-scheduled {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.match-status-live {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.match-status-finished {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.match-vs-display {
  display: flex;
  align-items: center;
  gap: 20px;
}

.match-team-display {
  width: 140px;
  font-weight: 600;
  font-size: 1rem;
}

.match-team-left { text-align: right; }
.match-team-right { text-align: left; }

.match-scores-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sports);
  font-size: 1.75rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-win { color: var(--roast-duck); }
.score-loss { color: var(--text-muted); }

.match-status-btn {
  font-size: 0.8rem;
  font-weight: 600;
}

/* 挑戰賽特別卡片 */
.challenge-match-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}

.challenge-badge-title {
  background: var(--watermelon-red);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 8px;
}

.challenge-note {
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 8px;
  margin-top: 12px;
  border-left: 3px solid var(--watermelon-red);
}

/* 線上抽籤頁面 */
.draw-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.draw-page-lead {
  margin-top: 8px;
  color: var(--text-muted);
}

.draw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  margin-bottom: 24px;
}

.draw-panel {
  width: 100%;
}

.draw-panel.admin-only {
  flex-direction: column;
}

.draw-login-form {
  display: grid;
  gap: 16px;
}

.draw-primary-action {
  width: 100%;
  margin-top: 4px;
}

.draw-session-card {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.draw-eyebrow {
  display: block;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.draw-session-card h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.draw-session-card p,
.draw-status-note {
  color: var(--text-muted);
}

.draw-session-actions,
.draw-admin-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.draw-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
}

.draw-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--roast-duck));
  transition: width 0.35s ease;
}

.draw-admin-tools {
  margin-top: 18px;
}

.draw-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.draw-slot-card {
  min-height: 142px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(17, 26, 36, 0.62);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.draw-slot-card.is-drawn {
  border-color: rgba(16, 185, 129, 0.42);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.08));
}

.draw-slot-id {
  font-family: var(--font-sports);
  font-size: 2rem;
  color: var(--roast-duck);
  font-weight: 700;
}

.draw-slot-team {
  font-weight: 700;
  line-height: 1.25;
}

.draw-slot-meta {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* === DRAW GAME STAGE === */
.draw-game-stage {
  position: relative;
  display: grid;
  gap: 20px;
  margin: 0 0 24px;
  padding: clamp(20px, 4vw, 32px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 50% 0 / 64px 64px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px) 50% 0 / 64px 64px,
    radial-gradient(circle at 16% 18%, rgba(239, 68, 68, 0.22), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(16, 185, 129, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(7, 11, 17, 0.94), rgba(17, 26, 36, 0.84));
  box-shadow: var(--shadow-lg);
}

.draw-game-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 16px;
}

.draw-game-kicker {
  width: 100%;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.draw-game-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.25rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--color-text);
}

.draw-game-status {
  min-height: 34px;
  max-width: min(100%, 360px);
  padding: 7px 12px;
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 999px;
  color: var(--primary);
  background: rgba(6, 182, 212, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.draw-balls-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.draw-ball {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 86px;
  padding: 12px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(7, 11, 17, 0.74);
}

.draw-ball::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid color-mix(in srgb, var(--ball-color, var(--primary)) 62%, transparent);
  border-radius: 999px;
  opacity: 0.88;
}

.draw-ball strong {
  position: relative;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ball-color, var(--primary));
}

.draw-ball span {
  position: relative;
  max-width: 100%;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.draw-ball.is-drawn {
  background: rgba(245, 158, 11, 0.12);
}

.draw-ball.is-highlight {
  border-color: rgba(16, 185, 129, 0.78);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.22);
}

.draw-action-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

.draw-action-display {
  min-height: 82px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: rgba(7, 11, 17, 0.68);
}

.draw-action-team {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.draw-action-display strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 0.95;
}

.btn-draw-spin {
  min-width: 152px;
  min-height: 52px;
  white-space: nowrap;
}

.draw-roulette-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 11, 17, 0.82);
  backdrop-filter: blur(10px);
}

.draw-roulette-overlay[hidden] {
  display: none;
}

.draw-roulette-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(520px, 92vw);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.draw-roulette-card canvas {
  width: min(480px, 76vw);
  height: auto;
  aspect-ratio: 1;
}

.draw-roulette-pointer {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 30px solid var(--roast-duck);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.38));
}

#draw-roulette-caption {
  color: var(--color-text-muted);
  font-weight: 700;
}

.draw-result-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.draw-result-cell {
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: rgba(7, 11, 17, 0.6);
}

.draw-result-cell strong {
  display: block;
  color: var(--roast-duck);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1;
}

.draw-result-cell span {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.draw-result-cell.is-highlight {
  border-color: rgba(16, 185, 129, 0.78);
  background: rgba(16, 185, 129, 0.12);
}

.draw-confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 10001;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.draw-match-preview-card {
  margin-bottom: 24px;
}

.draw-preview-list {
  max-height: 840px;
  overflow: auto;
  padding: 0 4px 4px 0;
}

.draw-poster {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background:
    radial-gradient(circle at 50% 14%, rgba(245, 158, 11, 0.2), transparent 26%),
    radial-gradient(circle at 50% 78%, rgba(6, 182, 212, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 235, 0.9));
  color: #111827;
  min-width: 900px;
  padding: 28px 22px 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.draw-poster-bg-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(135deg, transparent 0 8%, rgba(16, 185, 129, 0.18) 8% 9%, transparent 9% 100%),
    radial-gradient(circle at 16% 18%, rgba(239, 68, 68, 0.68) 0 3px, transparent 4px),
    radial-gradient(circle at 28% 84%, rgba(6, 182, 212, 0.62) 0 3px, transparent 4px),
    radial-gradient(circle at 76% 20%, rgba(245, 158, 11, 0.62) 0 3px, transparent 4px),
    radial-gradient(circle at 88% 76%, rgba(16, 185, 129, 0.62) 0 3px, transparent 4px);
}

.draw-poster::before,
.draw-poster::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 90px;
  border: 10px solid rgba(245, 158, 11, 0.26);
  border-top: 0;
  border-radius: 0 0 140px 140px;
  pointer-events: none;
}

.draw-poster::before {
  left: -46px;
  bottom: -22px;
  transform: rotate(12deg);
}

.draw-poster::after {
  right: -46px;
  bottom: -22px;
  transform: rotate(-12deg);
}

.draw-poster-heading {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 22px;
}

.draw-poster-kicker {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: #064e3b;
  color: #fef3c7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.draw-poster-heading h4 {
  margin: 8px 0 4px;
  color: #92400e;
  font-size: 3rem;
  line-height: 0.95;
  text-shadow: 0 3px 0 rgba(245, 158, 11, 0.24), 0 8px 14px rgba(17, 24, 39, 0.16);
}

.draw-poster-heading p {
  color: #374151;
  font-weight: 700;
}

.draw-poster-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 280px minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
}

.draw-poster-column {
  display: grid;
  gap: 8px;
}

.draw-poster-match {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 10px 12px;
  border: 2px solid rgba(17, 24, 39, 0.72);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.draw-poster-match::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 2px;
  background: rgba(17, 24, 39, 0.72);
}

.draw-poster-match-left::after {
  right: -20px;
}

.draw-poster-match-right::after {
  left: -20px;
}

.draw-poster-match-number {
  color: #b45309;
  font-family: var(--font-sports);
  font-size: 1.4rem;
  font-weight: 800;
}

.draw-poster-teams {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.draw-poster-team {
  overflow: hidden;
  color: #111827;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-poster-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 800;
}

.draw-poster-mission {
  color: #047857;
}

.draw-poster-referees {
  grid-column: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(4, 120, 87, 0.14);
  color: #4b5563;
  font-size: 0.72rem;
  line-height: 1.35;
}

.draw-poster-referee-label {
  grid-row: span 2;
  align-self: center;
  color: #047857;
  font-weight: 900;
  white-space: nowrap;
}

.draw-poster-center {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.draw-poster-cup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(245, 158, 11, 0.22)),
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(16, 185, 129, 0.16));
  border: 2px solid rgba(180, 83, 9, 0.28);
  box-shadow: 0 18px 34px rgba(146, 64, 14, 0.24);
}

.draw-poster-cup span {
  font-size: 4.5rem;
  filter: drop-shadow(0 10px 12px rgba(146, 64, 14, 0.28));
}

.draw-poster-final-card {
  width: 100%;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #111827, #1f2937);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 18px 28px rgba(17, 24, 39, 0.22);
}

.draw-poster-final-label {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 900;
}

.draw-poster-final-teams {
  display: grid;
  gap: 6px;
  font-size: 1rem;
}

.draw-poster-final-teams strong {
  color: #f9fafb;
}

.draw-poster-final-teams span {
  color: #f59e0b;
  font-family: var(--font-sports);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

.draw-poster-final-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: #d1d5db;
  font-size: 0.78rem;
  font-weight: 800;
}

.draw-poster-crown {
  padding: 9px 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #fde68a);
  color: #111827;
  font-family: var(--font-sports);
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(146, 64, 14, 0.24);
}

.draw-preview-time {
  color: var(--primary);
  font-family: var(--font-sports);
  font-size: 1.12rem;
  font-weight: 700;
}

.draw-preview-court,
.draw-preview-vs {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.draw-preview-team {
  font-weight: 700;
}

.draw-account-list {
  display: grid;
  gap: 8px;
}

.draw-account-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 160px 70px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.draw-account-row code {
  color: var(--primary);
  font-size: 0.82rem;
  word-break: break-all;
}

.draw-account-slot {
  color: var(--roast-duck);
  font-weight: 700;
  text-align: right;
}

/* 個人獎項與 MVP */
.awards-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 32px;
}

.mvp-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

.mvp-trophy {
  font-size: 3.5rem;
  color: var(--roast-duck);
  margin-bottom: 12px;
  animation: float 3s ease-in-out infinite;
}

.mvp-title {
  font-size: 1.8rem;
  color: var(--roast-duck);
  margin-bottom: 8px;
}

.mvp-player-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mvp-player-team {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.best7-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.best7-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.best7-role {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.best7-info {
  display: flex;
  gap: 16px;
}

.best7-player {
  font-weight: 700;
}

.best7-team {
  color: var(--text-muted);
}

/* --- 問題反應頁面 (#feedback) --- */
.feedback-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
}

.contact-card-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.contact-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary);
  border: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.contact-meta-box {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.contact-value {
  font-weight: 600;
}

/* 歷史問答列表 */
.feedback-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.feedback-history-item {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.fb-hist-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.fb-hist-content {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  border-left: 2px solid var(--watermelon-red);
  padding-left: 8px;
}

.fb-hist-reply {
  font-size: 0.88rem;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 6px;
  padding: 12px;
}

/* 頁尾 Footer */
.footer {
  background: #04080e;
  border-top: 1px solid var(--border-card);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 80px;
}

.footer-logo {
  font-family: var(--font-sports);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 1.5px;
}

.footer-copy {
  margin-top: 12px;
}

/* --- 動畫 --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 載入動畫 */
.loading-view {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(6, 182, 212, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- 隊伍專區 (Team Zone) 樣式 --- */

/* 1. 介紹頁 */
.team-intro-card {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 40px 48px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-color: rgba(6, 182, 212, 0.2);
}

.team-intro-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.team-intro-logo-group {
  font-size: 2.2rem;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.team-intro-main-title {
  font-size: 2.8rem;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.team-intro-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 24px 0;
}

.team-intro-description-box {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.team-intro-strong-text {
  font-weight: 600;
  color: var(--text-primary);
}

/* 2. 三步驟流程圖 */
.steps-flow-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0;
  gap: 16px;
}

.step-flow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(11, 18, 25, 0.8);
  border: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
  transition: var(--transition-smooth);
}

.step-flow-item:hover .step-circle {
  transform: scale(1.08);
  border-color: var(--roast-duck);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}

.step-num-title {
  font-family: var(--font-sports);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  line-height: 1;
}

.step-num-val {
  font-family: var(--font-sports);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.step-flow-item:hover .step-num-val {
  color: var(--roast-duck);
}

.step-flow-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-desc-action {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.step-flow-line-svg {
  flex: 1.5;
  display: flex;
  align-items: center;
}

.team-intro-footer-note {
  text-align: center;
  color: var(--roast-duck);
  font-weight: 500;
  font-size: 0.95rem;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-top: 32px;
  line-height: 1.6;
}

/* 3. 隊伍表單佈局 (2欄) */
.team-form-layout {
  display: grid;
  grid-template-columns: 3.5fr 8.5fr;
  gap: 40px;
  margin-top: 16px;
}

.team-logo-upload-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.team-logo-preview-box {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.team-logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-logo-preview-box.clickable:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.default-avatar-svg {
  width: 100px;
  height: 100px;
  color: rgba(255, 255, 255, 0.15);
}

.logo-edit-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(7, 11, 17, 0.8);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 0;
  text-align: center;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.team-logo-file-input-wrapper {
  margin-bottom: 8px;
}

.file-chosen-name {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  max-width: 180px;
}

.team-logo-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 6px;
}

/* 4. 成功畫面 */
.success-team-card {
  max-width: 500px;
  margin: 60px auto;
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.1);
}

.success-team-header {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.success-team-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.success-logo-icon {
  font-size: 2rem;
}

.success-team-title {
  font-size: 1.8rem;
  margin: 0;
}

.success-team-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin: 20px 0;
}

.success-team-body {
  font-size: 1.1rem;
}

.success-team-body p {
  margin-bottom: 24px;
  color: var(--text-primary);
}

.success-team-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* 5. 隊伍資訊佈局 */
.team-info-layout {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.team-logo-display-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-logo-frame {
  width: 100px;
  height: 100px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-details-display-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 12px;
  font-size: 1.05rem;
}

.detail-label {
  width: 120px;
  color: var(--text-muted);
  font-weight: 600;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-info-players-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.team-info-section-header {
  font-family: var(--font-sports);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.team-info-players-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.team-info-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.team-info-player-card {
  min-height: 68px;
}

.team-info-players-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  text-align: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

/* 6. 隊伍子分頁切換 */
.team-zone-subpage {
  display: none;
  animation: fadeIn 0.3s ease;
}

.team-zone-subpage.active {
  display: block;
}

/* --- RWD 響應式佈局 --- */

@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .navbar {
    height: 70px;
  }
  
  .nav-hamburger {
    display: block;
    position: relative;
    z-index: 121;
  }
  
  .nav-menu {
    position: fixed;
    top: 78px;
    left: 16px;
    right: 16px;
    max-height: calc(100vh - 94px);
    overflow-y: auto;
    background: #07111a;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    padding: 10px;
    gap: 6px;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: var(--transition-smooth);
    border: 1px solid rgba(6, 182, 212, 0.24);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    z-index: 120;
  }
  
  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
    padding: 10px 12px;
    justify-content: flex-start;
    border-radius: 8px;
  }

  .nav-item.active .nav-link {
    border-bottom: 0;
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    background: rgba(6, 182, 212, 0.12);
  }
  
  .nav-item:hover .dropdown-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
  }

  .nav-item.mobile-expanded .dropdown-menu,
  .nav-item.active.dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(2, 6, 12, 0.55);
    margin: 4px 0 6px;
    display: block;
    width: 100%;
    text-align: left;
    min-width: 0;
    padding: 4px;
  }
  
  .dropdown-item {
    font-size: 0.95rem;
    padding: 9px 12px;
  }
  
  .hero-title {
    font-size: 3.2rem;
  }
  
  .hero-tagline {
    font-size: 1.2rem;
  }
  
  .activity-meta-grid {
    grid-template-columns: 1fr;
  }
  
  .why-attend-grid {
    grid-template-columns: 1fr;
  }
  
  .register-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .sidebar-btn {
    white-space: nowrap;
    justify-content: center;
    padding: 10px 16px;
  }
  
  .sidebar-btn.active {
    border-left: none;
    border-bottom: 4px solid var(--primary);
    border-radius: 0;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }

  .results-header-row,
  .results-staff-actions,
  .results-edit-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .results-staff-actions {
    width: 100%;
  }

  .results-sync-status,
  #btn-edit-results,
  #btn-results-staff-logout {
    justify-content: center;
    width: 100%;
  }

  .results-staff-login-row {
    grid-template-columns: 1fr;
  }
  
  .match-item-card {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .match-vs-display {
    flex-direction: column;
    gap: 8px;
  }
  
  .match-team-display {
    width: auto;
    text-align: center !important;
  }
  
  .awards-grid {
    grid-template-columns: 1fr;
  }

  .team-info-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .team-logo-frame {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
    font-size: 0.95rem;
  }

  .detail-label {
    width: auto;
  }
}

@media (max-width: 480px) {
  .hero-content-wrapper {
    padding: 28px 12px;
  }

  .hero-title {
    font-size: clamp(1.72rem, 8.2vw, 2.2rem);
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .glass-card {
    padding: 16px;
  }

  .team-info-layout {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
  }

  .team-logo-frame {
    width: 60px;
    height: 60px;
  }
}

/* 會員專區頂部切換頁籤 */
.member-nav-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 0 auto 32px;
  max-width: 500px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.member-nav-tab-btn {
  padding: 10px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
  margin-bottom: -10px;
  cursor: pointer;
}

.member-nav-tab-btn:hover {
  color: var(--primary);
}

.member-nav-tab-btn.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* 全站頁面切換控制 */
.app-page {
  display: none;
}
.app-page.active {
  display: block;
}

.member-subpage {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-subpage.active {
  display: block;
}

.member-card {
  padding: 40px;
  max-width: 500px;
  margin: 0 auto;
  border-radius: 16px;
}

.member-header {
  text-align: center;
  margin-bottom: 28px;
}

.member-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: 1px;
}

.member-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.member-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.member-input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.member-form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px 14px 48px;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.member-form-control:focus {
  border-color: #00c49f;
  box-shadow: 0 0 0 3px rgba(0, 196, 159, 0.15);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.btn-racego {
  background-color: #00c49f;
  color: #070b11;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 12px;
  padding: 14px 24px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-racego:hover {
  background-color: #00e0b6;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 196, 159, 0.4);
}

.btn-racego:disabled,
.btn-racego[aria-disabled="true"] {
  background-color: rgba(148, 163, 184, 0.35);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-racego:disabled:hover,
.btn-racego[aria-disabled="true"]:hover {
  background-color: rgba(148, 163, 184, 0.35);
  transform: none;
  box-shadow: none;
}

.form-hint-text-red {
  display: block;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 6px;
  font-weight: 500;
}

.form-error-msg {
  display: block;
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 6px;
  font-weight: 600;
}

.member-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  margin-top: 12px;
}

.member-link-cyan {
  color: #00c49f;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.member-link-cyan:hover {
  color: #00e0b6;
  text-decoration: underline;
}

/* 第三方登入樣式 */
.social-login-section {
  margin-top: 28px;
  text-align: center;
}

.social-divider {
  position: relative;
  margin-bottom: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 1;
}

.social-divider span {
  position: relative;
  background: #0d1622; /* Blends with dark glass card bg */
  padding: 0 12px;
  z-index: 2;
}

.social-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-social {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-social svg {
  width: 16px;
  height: 16px;
}

.btn-social.google:hover {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.btn-social.line:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.member-bottom-links {
  text-align: center;
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.member-bottom-links-sub {
  text-align: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.host-icon {
  margin-right: 4px;
}

/* 狀態 Banner */
.member-alert-success {
  background: rgba(0, 196, 159, 0.12);
  border: 1px solid rgba(0, 196, 159, 0.25);
  border-radius: 10px;
  color: #00c49f;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.member-alert-success .alert-icon {
  font-size: 1.1rem;
}

/* 自訂核取方塊樣式 (Custom Checkbox) */
.checkbox-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  font-size: 0.88rem;
  user-select: none;
  color: var(--text-muted);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-container .checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: #00c49f;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #00c49f;
  border-color: #00c49f;
}

.checkbox-container .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #070b11;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-label-text {
  vertical-align: middle;
}

/* 自訂單選按鈕樣式 (Custom Radios) */
.custom-radio-group {
  padding-left: 48px !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  min-height: 48px;
}

.radio-options-container {
  display: flex;
  gap: 24px;
  align-items: center;
  width: 100%;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  user-select: none;
  gap: 8px;
}

.radio-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-btn-dot {
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  transition: var(--transition-fast);
}

.radio-label:hover input ~ .radio-btn-dot {
  border-color: #00c49f;
}

.radio-label input:checked ~ .radio-btn-dot {
  background-color: rgba(0, 196, 159, 0.1);
  border-color: #00c49f;
}

.radio-btn-dot:after {
  content: "";
  position: absolute;
  display: none;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00c49f;
}

.radio-label input:checked ~ .radio-btn-dot:after {
  display: block;
}

/* 註冊成功插圖與卡片 */
.success-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-checkmark-svg {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: block;
  stroke-width: 2;
  stroke: #00c49f;
  stroke-miterlimit: 10;
  box-shadow: inset 0px 0px 0px #00c49f;
  animation: fillCheckmark .4s ease-in-out .4s forwards, scaleCheckmark .3s ease-in-out .9s forwards;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke-miterlimit: 10;
  stroke: #00c49f;
  fill: none;
  animation: strokeCheckmark 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #070b11;
  animation: strokeCheckmark 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes strokeCheckmark {
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes fillCheckmark {
  100% {
    box-shadow: inset 0px 0px 0px 50px #00c49f;
  }
}
@keyframes scaleCheckmark {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

.verify-instructions-card {
  background: rgba(0, 196, 159, 0.05);
  border: 1px dashed rgba(0, 196, 159, 0.25);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
  text-align: left;
}

.verify-card-title {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.verify-card-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.verify-card-text-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

/* 模擬信箱專屬樣式 */
.mock-email-card {
  border: 1px solid #e2e8f0;
}

/* 個人中心資料展示 */
.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  align-items: center;
  transition: var(--transition-fast);
}

.profile-detail-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 196, 159, 0.2);
}

.detail-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.detail-value {
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 500;
}

/* 登入按鈕在 navbar 中的樣式修正 */
.btn-login-nav {
  display: inline-flex;
  padding: 6px 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.btn-login-nav:hover {
  background-color: #00c49f;
  color: #070b11;
  border-color: #00c49f;
}

.nav-user-chip {
  gap: 10px;
  min-width: 150px;
  max-width: 230px;
  padding: 6px 12px !important;
  background: rgba(0, 196, 159, 0.09);
  border: 1px solid rgba(0, 196, 159, 0.28);
  border-radius: 8px;
}

.nav-user-chip:hover {
  background: rgba(0, 196, 159, 0.16);
  border-color: rgba(0, 196, 159, 0.55);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  background: linear-gradient(135deg, var(--primary), var(--watermelon));
  color: #071014;
  font-size: 0.8rem;
  font-weight: 800;
}

.nav-user-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.nav-user-status {
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
}

.nav-user-name {
  max-width: 130px;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   8. 線上報名與個人中心新版樣式 (Horizontal Tabs, Wizard, Roster Modal, Profile)
   ========================================================================== */

/* 頂端水平 Tab 導覽 */
.tournament-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
.tournament-tabs-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tournament-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.tournament-tab-btn:hover {
  color: var(--text-primary);
}

.tournament-tab-btn.active {
  color: #00c49f;
}

.tournament-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #00c49f;
  box-shadow: 0 0 8px rgba(0, 196, 159, 0.6);
}

/* Tab Panels */
.tournament-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.tournament-tab-panel.active {
  display: block;
}

/* 賽事介紹清單 */
.tournament-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tournament-info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: var(--transition-fast);
}
.tournament-info-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 196, 159, 0.15);
}
.info-icon-box {
  width: 42px;
  height: 42px;
  background: rgba(0, 196, 159, 0.08);
  border: 1px solid rgba(0, 196, 159, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.info-content-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}
.info-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* 分組卡片 */
.group-category-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 196, 159, 0.3);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 16px rgba(0, 196, 159, 0.05);
  transition: var(--transition-medium);
}
.group-category-card:hover {
  border-color: #00c49f;
  box-shadow: 0 0 24px rgba(0, 196, 159, 0.12);
  transform: translateY(-2px);
}
.group-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.group-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}
.group-ball-icon {
  width: 46px;
  height: 46px;
  background: rgba(0, 196, 159, 0.12);
  border: 1px solid rgba(0, 196, 159, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.group-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  letter-spacing: 0.5px;
}
.group-status-tag {
  background: rgba(0, 196, 159, 0.1);
  border: 1px solid rgba(0, 196, 159, 0.3);
  color: #00c49f;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.group-card-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.group-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.group-stat-col {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
  text-align: left;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-value-orange {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f59e0b;
}
.group-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 16px;
  border-radius: 12px;
}
.fee-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.fee-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f59e0b;
}
.group-card-actions {
  display: flex;
  gap: 12px;
}
.group-card-actions button {
  flex: 1;
}

/* 報名精靈步驟指示條 */
.wizard-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 0 16px;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}
.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  z-index: 2;
}
.step-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition-fast);
}
.wizard-step.active .step-badge {
  background: #00c49f;
  border-color: #00c49f;
  color: #070b11;
  box-shadow: 0 0 12px rgba(0, 196, 159, 0.4);
}
.wizard-step.active .step-text {
  color: #00c49f;
}
.wizard-step.completed .step-badge {
  background: #00c49f;
  border-color: #00c49f;
  color: #070b11;
}
.wizard-step.completed .step-text {
  color: var(--text-primary);
}
.wizard-step-line {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  flex: 1;
  margin: 0 -16px 20px -16px;
  transition: var(--transition-fast);
}
.wizard-step-line.active {
  background: #00c49f;
}

.wizard-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}
.wizard-panel.active {
  display: block;
}
.wizard-section-title {
  font-size: 1.2rem;
  border-left: 3px solid #00c49f;
  padding-left: 10px;
  margin-bottom: 20px;
}

/* 隊員輸入行樣式 (Wizard Form) */
.player-wizard-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}
.player-wizard-input-row:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}
.player-row-index {
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
  font-size: 0.95rem;
}
.player-name-input-wrapper {
  flex: 1;
}
.player-wizard-remove-btn {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition-fast);
}
.player-wizard-remove-btn:hover {
  color: var(--red-light);
}

/* 隊伍名單彈窗 */
.member-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 17, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.member-modal-card {
  background: rgba(16, 26, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0, 196, 159, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.member-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}
.modal-close-btn:hover {
  color: var(--text-primary);
}
.member-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.member-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 11, 17, 0.2);
}
.roster-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 576px) {
  .roster-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.roster-team-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.roster-team-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}
.roster-team-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.roster-team-size-badge {
  background: rgba(0, 196, 159, 0.1);
  color: #00c49f;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
}
.roster-players-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.roster-player-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 會員個人中心左右分欄 Layout */
.profile-layout-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 992px) {
  .profile-layout-wrapper {
    grid-template-columns: 280px 1fr;
  }
}

/* 左側邊欄 */
.profile-sidebar-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: 16px;
}
.profile-sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #00c49f;
  color: #070b11;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 196, 159, 0.3);
}
.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  overflow: hidden;
}
.profile-meta h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.profile-meta p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.profile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-menu-link {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-fast);
  text-align: left;
  width: 100%;
}
.profile-menu-link svg {
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.profile-menu-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}
.profile-menu-link.active {
  background: rgba(0, 196, 159, 0.08);
  color: #00c49f;
  border-left: 3px solid #00c49f;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.profile-menu-link.active svg {
  color: #00c49f;
}

/* 右側主要面板 */
.profile-main-panels {
  display: flex;
  flex-direction: column;
}
.profile-content-panel {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-content-panel.active {
  display: block;
}

/* 報名紀錄表格卡片樣式 */
.profile-record-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: left;
  transition: var(--transition-fast);
}
.profile-record-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 196, 159, 0.15);
}
.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.record-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.record-status-badge {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.record-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.record-detail-val {
  color: var(--text-primary);
  font-weight: 500;
}

/* 章程展示文字排版（保留換行對齊） */
.rules-content-display {
  white-space: normal;
  line-height: 1.75;
  font-size: 0.96rem;
  color: var(--text-primary);
  text-align: left;
  padding: 10px 16px;
  overflow-x: auto;
}

.rules-content-display h4 {
  color: var(--primary);
  font-size: 1rem;
  margin: 18px 0 8px;
}

.rules-content-display p {
  margin: 8px 0;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  min-width: 640px;
}

.rules-table th,
.rules-table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.rules-table th {
  background: rgba(0, 196, 159, 0.12);
  color: var(--primary);
}

.rules-table tr.highlight td {
  background: rgba(255, 183, 3, 0.08);
  color: var(--text-primary);
  font-weight: 600;
}

.rules-table.compact {
  min-width: 420px;
}

.rules-table.schedule {
  font-size: 0.9rem;
}

/* 章程編輯區塊樣式 */
.rules-edit-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}

.rules-edit-section-card h4 {
  font-size: 1.1rem;
  color: #00c49f;
  margin: 0 0 16px 0;
  border-left: 3px solid #00c49f;
  padding-left: 8px;
}

.page-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.editable-form-card {
  margin-bottom: 32px;
  text-align: left;
}

.edit-form-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dynamic-edit-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.dynamic-edit-section h4,
.edit-section-header h4 {
  color: var(--primary);
  margin: 0 0 12px;
}

.edit-section-header,
.edit-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-actions-row {
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

.dynamic-edit-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.dynamic-edit-row-stacked {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.btn-small {
  width: auto;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.results-edit-table-wrap {
  overflow-x: auto;
}

.editable-table input,
.editable-table select {
  min-width: 84px;
}

.feedback-actions-row,
.feedback-reply-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.feedback-reply-inline textarea {
  flex: 1 1 220px;
}

.myteam-info-editor {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 18px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.myteam-logo-editor {
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.myteam-logo-preview {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2rem;
}

.myteam-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .page-action-row,
  .edit-section-header,
  .edit-actions-row,
  .feedback-actions-row,
  .feedback-reply-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .dynamic-edit-row {
    grid-template-columns: 1fr;
  }

  .myteam-info-editor {
    flex-direction: column;
  }

  .myteam-logo-editor {
    width: 100%;
  }

  .draw-header-row,
  .draw-session-card,
  .draw-session-actions,
  .draw-admin-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .draw-layout,
  .draw-board-grid {
    grid-template-columns: 1fr;
  }

  .draw-preview-row,
  .draw-account-row {
    grid-template-columns: 1fr;
  }

  .draw-poster {
    min-width: 0;
    padding: 22px 14px 18px;
  }

  .draw-poster-heading h4 {
    font-size: 2.1rem;
  }

  .draw-poster-grid {
    grid-template-columns: 1fr;
  }

  .draw-poster-center {
    order: -1;
  }

  .draw-poster-column {
    gap: 10px;
  }

  .draw-poster-match::after {
    display: none;
  }

  .draw-poster-match {
    min-height: 78px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .draw-balls-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .draw-action-panel {
    grid-template-columns: 1fr;
  }

  .btn-draw-spin {
    width: 100%;
  }

  .draw-result-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draw-account-slot {
    text-align: left;
  }
}
