/* 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;
  
  --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: 86px 24px 108px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  perspective: 1200px;
  min-height: 520px;
  display: flex;
  align-items: center;
  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: 4.8rem;
  font-family: var(--font-sports);
  line-height: 1.05;
  margin-bottom: 22px;
  text-transform: uppercase;
  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;
  transform: translateZ(35px);
}

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

.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: 62px 16px 82px;
    min-height: auto;
  }
  .hero-content-wrapper {
    padding: 32px 24px;
    border-radius: 20px;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-tagline {
    font-size: 1.15rem;
  }
  .hero-sub {
    font-size: 1.02rem;
    margin-bottom: 28px;
  }
  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }
  .hero-cta .btn {
    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-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;
}

/* 活動簡介與西瓜烤鴨主題 */
.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-tabs {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
}

.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;
}

/* 循環賽積分表 */
.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;
}

.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-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);
}

/* 個人獎項與 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;
}

/* 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;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 11, 17, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: var(--transition-smooth);
    border-top: 1px solid var(--border-card);
  }
  
  .nav-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-link {
    font-size: 1.15rem;
    padding: 12px;
    justify-content: center;
  }
  
  .nav-item:hover .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    margin-top: 8px;
    display: block;
    width: 100%;
    text-align: center;
  }
  
  .dropdown-item {
    font-size: 1rem;
    padding: 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;
  }
  
  .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-title {
    font-size: 2.5rem;
  }
  
  .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%;
  }
}
