/* TOCHIGI SPORTS LIFE - スタイルシート */

/* 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ヒーローセクション */
.hero-section {
  height: 500px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%),
              url('https://images.unsplash.com/photo-1461896836934-ffe607ba8211?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  background: rgba(0, 0, 0, 0.3);
}

.hero-slide.active {
  opacity: 1;
}

/* ロゴスタイル */
.site-logo {
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* セクションヘッダー */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* カードスタイル */
.match-card,
.team-card,
.guide-card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.match-card:hover,
.team-card:hover,
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* スポーツバッジ */
.sport-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

/* フッター */
.site-footer {
  background: #000000;
  color: white;
  padding: 3rem 0 1rem;
  border-top: 3px solid #FBBF24;
}

.site-footer a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.site-footer a:hover {
  opacity: 0.8;
}

/* ローディングアニメーション */
.loading {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  z-index: 9999 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.modal.active {
  display: flex !important;
  align-items: flex-start;  /* 上部から表示 */
  justify-content: center;
  padding: 2rem;
  padding-top: 2rem;  /* 上部に少しスペースを追加 */
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* テキストの切り詰め */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .hero-section {
    height: 400px;
  }
  
  .site-logo {
    font-size: 1.25rem;
  }
  
  .site-logo .text-3xl {
    font-size: 1.5rem;
  }
}

/* 選手カード用の追加スタイル */
#players .grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 1.5rem !important;
}

.player-card {
  display: flex !important;
  flex-direction: column !important;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  min-width: 250px;
  max-width: 100%;
}

.player-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
  #players .grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  #players .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1025px) and (max-width: 1280px) {
  #players .grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (min-width: 1281px) {
  #players .grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

