@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap");

:root {
  --primary-color: #4db6ac;
  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,0.05);
  --border-radius: 24px;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: var(--bg-color);
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

nav {
  background: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-color);
  text-decoration: none;
}

nav .nav-links a {
  text-decoration: none;
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

header { text-align: center; padding: 3rem 0; }
header h1 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 1rem; font-weight: 700; }
header p { color: #666; }

.player-card {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.visualizer {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  height: 60px;
  margin-bottom: 3rem;
}

.visualizer .bar {
  width: 12px;
  height: 20px;
  background: #e0f2f1;
  border-radius: 6px;
  transition: all 0.2s;
}

.visualizer.playing .bar {
  background: var(--primary-color);
  animation: bounce 0.8s ease-in-out infinite alternate;
}

@keyframes bounce {
  from { height: 10px; }
  to { height: 60px; }
}

.visualizer .bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer .bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer .bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer .bar:nth-child(5) { animation-delay: 0.4s; }

.mallang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.sound-btn {
  background: #f8f9fa;
  border: 2px solid #eee;
  padding: 1.5rem 0.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.sound-btn:hover { border-color: var(--primary-color); transform: translateY(-3px); }
.sound-btn.active {
  background: #f0fdfc;
  border-color: var(--primary-color);
  box-shadow: 0 8px 20px rgba(77, 182, 172, 0.15);
}

.sound-btn .icon { font-size: 2rem; }
.sound-btn .label { font-weight: 700; color: #444; font-size: 0.85rem; word-break: keep-all; }

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #f5f5f5;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
}

input[type="range"] {
  flex: 1;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.stop-btn {
  background: #90a4ae;
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.stop-btn:hover { background: #78909c; }

footer { text-align: center; padding: 4rem 2rem; color: #999; font-size: 0.85rem; }

@media (max-width: 768px) {
  .mallang-grid { grid-template-columns: repeat(2, 1fr); }
  .player-card { padding: 2rem 1rem; }
}