/* CONTENTS Page Specific Styles */

/* Hero Section */
.contents-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.contents-hero h2 {
  font-size: 60px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.contents-hero p {
  font-size: 18px;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 0 auto;
}

/* Section Styles */
.section-dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 60px 0;
  margin: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 50px;
  color: #ffffff;
  margin-bottom: 10px;
}

.section-dark .section-title {
  color: #ffffff;
}

.section-subtitle {
  text-align: center;
  color: #aaaaaa;
  margin-bottom: 40px;
  font-size: 16px;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.game-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  transition: all 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.game-container h4 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

.game-info {
  text-align: center;
  color: #cccccc;
  font-size: 14px;
  margin-bottom: 20px;
}

.game-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  color: #ffffff;
  font-size: 14px;
}

.btn-game {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-game:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* MUSIMON Game - Large Card */
.game-card-large {
  grid-column: span 2;
}

.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  /* 4:3 aspect ratio */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  margin: 20px 0;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.btn-game[target="_blank"] {
  text-decoration: none;
  display: inline-block;
}


/* Memory Game */
.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.memory-card {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
  position: relative;
}

.memory-card.flipped {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.memory-card.matched {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  opacity: 0.6;
  cursor: default;
}

.memory-card:hover:not(.matched) {
  transform: scale(1.05);
}

.memory-card .card-front,
.memory-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  transition: transform 0.3s ease;
}

.memory-card .card-back {
  transform: rotateY(180deg);
}

.memory-card.flipped .card-front {
  transform: rotateY(180deg);
}

.memory-card.flipped .card-back {
  transform: rotateY(0deg);
}

/* Color Match Game */
.color-display {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 40px;
  margin: 20px 0;
  text-align: center;
}

.color-text {
  font-size: 48px;
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.color-option {
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.color-option:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.color-option.correct {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-color: #00f2fe;
}

.color-option.wrong {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-color: #f5576c;
}

/* Rhythm Game */
.rhythm-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  height: 200px;
  position: relative;
  overflow: hidden;
  margin: 20px 0;
}

.rhythm-target {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.rhythm-note {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  top: -60px;
  animation: fall linear;
}

@keyframes fall {
  to {
    top: 100%;
  }
}

.rhythm-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.rhythm-feedback.show {
  opacity: 1;
}

/* Audio Section */
#audio-section {
  padding: 60px 0;
}

.audio-category {
  margin-bottom: 60px;
}

.category-title {
  font-size: 36px;
  color: var(--accent-color);
  margin-bottom: 10px;
  text-align: center;
}

.category-description {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 40px;
  font-size: 16px;
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.audio-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.audio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-color);
}

.audio-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.audio-card h5 {
  font-size: 20px;
  color: var(--accent-color);
  margin-bottom: 8px;
  font-weight: 400;
}

.audio-card p {
  color: var(--secondary-color);
  font-size: 14px;
  margin-bottom: 20px;
  min-height: 40px;
}

.audio-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-play,
.btn-download {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
  display: inline-block;
}

.btn-play {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.btn-play:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-play.playing {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-download {
  background: #323030;
  color: #ffffff;
}

.btn-download:hover {
  background: #ffffff;
  color: #1a1a1a;
  outline: 1px solid #1a1a1a;
}

/* Expandable Sound Lists */
.btn-view-sounds {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-view-sounds:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-view-sounds.active {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.sound-list {
  margin-top: 15px;
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sound-list.expanded {
  max-height: 500px;
}

.sound-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #f9f9f9;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sound-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
}

.sound-item span {
  font-size: 14px;
  color: var(--text-color);
  font-weight: 500;
}

.sound-actions {
  display: flex;
  gap: 8px;
}

.btn-play-small,
.btn-download-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #ffffff;
}

.btn-play-small {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-play-small:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
}

.btn-download-small {
  background: #323030;
}

.btn-download-small:hover {
  background: var(--accent-color);
  transform: scale(1.1);
}


/* Responsive Design */
@media (max-width: 768px) {
  .contents-hero h2 {
    font-size: 40px;
  }

  .section-title {
    font-size: 36px;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .audio-grid {
    grid-template-columns: 1fr;
  }

  .color-text {
    font-size: 32px;
  }

  .memory-board {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .game-card {
    padding: 20px;
  }

  .game-card-large {
    grid-column: span 1;
  }

  .iframe-container {
    padding-bottom: 100%;
    /* Square on mobile */
  }
}

@media (max-width: 480px) {
  .contents-hero {
    padding: 40px 0 30px;
  }

  .contents-hero h2 {
    font-size: 32px;
  }

  .section-dark {
    padding: 40px 0;
  }

  .category-title {
    font-size: 28px;
  }

  .audio-actions {
    flex-direction: column;
  }

  .btn-play,
  .btn-download {
    width: 100%;
  }
}