/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Header */
header {
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
  padding: 40px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Hero Header for Top Page */
.hero-header {
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  padding: 60px 40px;
}

.hero-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* Main Content */
main {
  padding: 40px;
}

/* Landing Page */
.landing {
  text-align: center;
}

.team-selection,
.admin-access {
  margin-bottom: 40px;
}

.team-selection h2,
.admin-access h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: #333;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.team-card {
  display: block;
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
  padding: 30px 20px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(40, 160, 135, 0.3);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(40, 160, 135, 0.4);
}

.team-letter {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.team-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* Team Dashboard */
.team-dashboard {
  max-width: 900px;
  margin: 0 auto;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.score-card {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e9ecef;
}

.score-card h2 {
  font-size: 1.2rem;
  color: #28A087;
  margin-bottom: 16px;
}

.score {
  font-size: 3rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.score.large {
  font-size: 4rem;
  color: #28A087;
}

.label {
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.total-score {
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 30px;
}

.total-score h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.total-score .score {
  color: white;
}

.total-score .label {
  color: rgba(255, 255, 255, 0.8);
}

.metadata {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.metadata p {
  margin-bottom: 16px;
  color: #6c757d;
}

/* Admin Dashboard */
.admin-dashboard {
  max-width: 1000px;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

thead {
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
}

tbody tr:hover {
  background: #f8f9fa;
}

.team-cell {
  font-weight: 600;
  color: #28A087;
}

.total-cell {
  font-weight: bold;
  font-size: 1.1rem;
  color: #333;
}

.score-input {
  width: 80px;
  padding: 8px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 1rem;
  text-align: center;
}

.score-input:focus {
  outline: none;
  border-color: #28A087;
}

.admin-actions {
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(40, 160, 135, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 160, 135, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-admin {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Utility Classes */
.loading,
.error {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
}

.loading {
  color: #28A087;
}

.error {
  color: #dc3545;
  background: #f8d7da;
  border: 2px solid #f5c6cb;
  border-radius: 8px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.9rem;
}

/* New Content Sections */
.info-section {
  background: white;
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.section-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  text-align: center;
}

.info-section h2 {
  font-size: 1.8rem;
  color: #1a1a1a;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
}

.info-content {
  text-align: center;
  color: #666;
  line-height: 1.8;
}

.placeholder-text {
  font-size: 1.1rem;
  color: #999;
  font-style: italic;
  padding: 20px;
}

/* Venue Styles */
.venue-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.venue-name {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.venue-name strong {
  font-size: 1.4rem;
  display: block;
}

.venue-name-jp {
  font-size: 1.1rem;
  color: #666;
  display: block;
}

.venue-info {
  border-radius: 12px;
}

.venue-info-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.venue-info-row:last-child {
  margin-bottom: 0;
}

.venue-info-label {
  flex-shrink: 0;
  width: 100px;
  font-weight: 700;
  color: #28A087;
  font-size: 1.05rem;
  margin: 0;
}

.venue-info-text {
  flex: 1;
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.venue-info-text p {
  margin: 0 0 3px 0;
}

.venue-info-text p:last-child {
  margin-bottom: 0;
}

.venue-name-text {
  display: block;
}

.route-detail-link,
.venue-detail-link {
  display: inline-block;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 3px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(75, 85, 99, 0.3);
  transition: all 0.2s;
}

.route-detail-link:hover,
.venue-detail-link:hover {
  color: #1f2937;
  border-bottom-color: #1f2937;
}


/* Map Container */
.venue-map-container {
  position: relative;
  width: 100%;
  height: 300px;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.venue-map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Mobile tap overlay to enable map interaction */
.venue-map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(40, 160, 135, 0.92);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Timetable Styles */
.timetable-content {
  max-width: 450px;
  margin: 0 auto;
  text-align: left;
}

.timetable-part {
  margin-bottom: 30px;
}

.timetable-part h3 {
  font-size: 1.5rem;
  color: #28A087;
  margin-bottom: 15px;
  font-weight: 700;
  text-align: center;
}

.timetable-list {
  list-style: none;
  padding: 0;
}

.timetable-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 1rem;
  color: #333;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.timetable-list li:last-child {
  border-bottom: none;
}

.timetable-list .time {
  display: block;
  min-width: 60px;
  flex-shrink: 0;
  font-weight: 600;
  color: #28A087;
}

.timetable-list .break-time {
  text-align: center;
  font-style: italic;
  color: #999;
  padding: 15px 0;
  display: block;
  width: 100%;
}

.timetable-note {
  margin-top: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
}

.timetable-note p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

/* Team Members Styles */
.team-members-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.team-member-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.team-member-header-link {
  text-decoration: none;
  display: block;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #28A087;
  transition: all 0.2s;
}

.team-member-header-link:hover {
  border-bottom-color: #1F7367;
}

.team-member-header {
  font-size: 1.2rem;
  color: #28A087;
  font-weight: 700;
  text-align: center;
  margin: 0;
  transition: all 0.2s;
}

.team-member-header-link:hover .team-member-header {
  color: #1F7367;
}

.member-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.member-item {
  padding: 6px 0;
  font-size: 0.95rem;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.member-item.leader {
  font-weight: 600;
  color: #333;
}

.leader-badge {
  background: #28A087;
  color: white;
  font-size: 0.5rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Simple Game Styles */
.simple-game-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.simple-game-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #28A087;
  text-align: center;
  overflow: hidden;
  max-width: 100%;
}

.simple-game-title {
  font-size: 1.8rem;
  color: #28A087;
  font-weight: 700;
  margin-bottom: 8px;
}

.simple-game-subtitle {
  font-size: 1rem;
  color: #666;
  margin-bottom: 12px;
  font-weight: 500;
}

.game-tagline {
  font-family: 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'HG明朝E', 'MS P明朝', 'MS PMincho', serif;
  font-size: 1.15rem;
  color: #1a1a1a;
  font-weight: 700;
  font-style: normal;
  line-height: 1.8;
  margin: 20px 0 25px;
  padding: 12px 8px;
  text-align: center;
  letter-spacing: 0.05em;
  position: relative;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, rgba(250, 250, 248, 0.8) 0%, rgba(245, 245, 243, 0.9) 100%);
  border-top: 1px solid rgba(40, 160, 135, 0.3);
  border-bottom: 1px solid rgba(40, 160, 135, 0.3);
  white-space: nowrap;
  overflow: hidden;
}

.game-format {
  font-size: 0.8rem;
  color: #999;
  text-align: center;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.game-participants {
  font-size: 0.85rem;
  color: #28A087;
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

.simple-game-required h4 {
  font-size: 1rem;
  color: #555;
  font-weight: 600;
  margin-bottom: 12px;
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
}

.radar-chart-container {
  position: relative;
  height: 250px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-chart-container canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
}

/* Prizes Grid Styles */
.prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
}

.prize-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 2px solid #28A087;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.prize-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(40, 160, 135, 0.25);
}

.prize-number {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #28A087 0%, #1F7367 100%);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(40, 160, 135, 0.4);
  z-index: 10;
}

.prize-image-container {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.prize-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.3s;
}

.prize-card:hover .prize-image {
  transform: scale(1.05);
}

.prize-name {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 5px;
}

/* Content Divider */
.content-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, #e0e0e0 50%, transparent);
  margin: 60px 0;
  position: relative;
}

.content-divider::after {
  content: '⬇';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 0 20px;
  font-size: 1.5rem;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .hero-header h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .info-section {
    padding: 30px 20px;
  }

  .section-icon {
    font-size: 2.5rem;
  }

  .info-section h2 {
    font-size: 1.5rem;
  }

  .venue-info-row {
    flex-direction: column;
    gap: 8px;
  }

  .venue-info-label {
    width: auto;
  }

  .venue-name strong {
    font-size: 1.2rem;
  }

  .venue-name-jp {
    font-size: 1rem;
  }


  .venue-map-container {
    height: 250px;
  }

  .team-members-container {
    grid-template-columns: 1fr;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 12px 8px;
  }

  .score-input {
    width: 60px;
  }

  /* Simple Game Container Mobile Fixes */
  .simple-game-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .simple-game-card {
    padding: 20px;
  }

  .simple-game-title {
    font-size: 1.5rem;
  }

  .game-tagline {
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 15px 0 20px;
    padding: 10px 12px;
    letter-spacing: 0.05em;
  }

  .simple-game-subtitle {
    font-size: 0.9rem;
  }

  .radar-chart-container {
    height: 200px;
    max-width: 100%;
  }

  /* Prizes Grid Mobile Styles */
  .prizes-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 10px 0;
  }

  .prize-card {
    padding: 15px;
  }

  .prize-number {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    top: 10px;
    left: 10px;
  }

  .prize-image-container {
    height: 180px;
    padding: 8px;
  }

  .prize-name {
    font-size: 0.9rem;
    min-height: 35px;
  }
}
