/* =========================================
   Schedule Page Specific Styles
   ========================================= */

/* 1. Page Hero */
.page-hero {
  position: relative;
  height: 35vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0;
  color: #fff;
  background: #000;
}

.page-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,70,46,0.8) 0%, rgba(0,0,0,0.4) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-content h1 {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* 2. Filter Section (篩選列) */
.filter-section {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 24px 0;
  position: sticky;
  top: var(--header-height); /* 黏在 Header 下方 */
  z-index: 900;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-base);
  font-size: 1rem;
  color: var(--text-main);
  background: #f9f9f9;
  transition: 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.btn-search {
  padding: 11px 32px;
  height: 46px; /* Match input height roughly */
  border-radius: 8px;
  min-width: 120px;
}

/* 3. Schedule Content */
.date-group {
  margin-bottom: 40px;
}

.date-header {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 4px solid var(--secondary);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.date-header .weekday {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* 4. Match Card */
.match-item {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border: 1px solid transparent;
  transition: 0.2s;
}

.match-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color);
}

/* Left: Time & Group */
.match-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 120px;
  border-right: 1px solid #eee;
  padding-right: 20px;
}

.match-time {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
}

.match-group {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: #f5f5f5;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

/* Center: Teams & Score */
.match-center {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
}

.team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  font-size: 1.1rem;
  font-weight: 600;
}

.team.home { justify-content: flex-end; text-align: right; }
.team.away { justify-content: flex-start; text-align: left; }

.team img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.score-board {
  margin: 0 20px;
  background: #f4f6f8;
  padding: 6px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
}

.vs { color: #aaa; font-size: 0.9rem; font-weight: 600; }
.score { font-size: 1.5rem; font-weight: 700; color: var(--text-main); width: 24px; text-align: center; }

/* Right: Venue & Status */
.match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 180px;
  text-align: right;
  border-left: 1px solid #eee;
  padding-left: 20px;
}

.venue {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.status {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.status.upcoming { background: #e3f2fd; color: #1565c0; }
.status.live { background: #ffebee; color: #c62828; animation: pulse 2s infinite; }
.status.end { background: #eee; color: #666; }

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* Finished Match Styling */
.match-item.finished .match-time { color: #888; }
.match-item.finished .score.win { color: var(--primary); }

/* Responsive */
@media (max-width: 900px) {
  .match-item { flex-direction: column; padding: 20px; gap: 16px; }
  
  .match-left, .match-right { 
    width: 100%; 
    border: none; 
    padding: 0; 
    flex-direction: row; 
    justify-content: space-between; 
    align-items: center; 
  }
  
  .match-center { width: 100%; padding: 10px 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
  .match-time { font-size: 1.1rem; }
  .venue { margin: 0; font-size: 0.85rem; }
  
  .filter-bar { flex-direction: column; align-items: stretch; gap: 16px; }
  .filter-group { min-width: auto; }
  .btn-search { width: 100%; }
}

@media (max-width: 480px) {
  .team .t-name { display: none; } /* 手機版太窄時，隱藏隊名，只顯示國旗 */
  .score-board { margin: 0 10px; padding: 4px 12px; }
  .match-center { padding: 16px 0; }
  .team img { width: 48px; height: 48px; }
}