/* audio-word — Styles */

:root {
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --card-border: #2a2a4e;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --online: #22c55e;
  --offline: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image: radial-gradient(ellipse at top, #1a1a3e 0%, transparent 50%),
    radial-gradient(ellipse at bottom, #0a0a1a 0%, transparent 50%);
}

.container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

header {
  text-align: center;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Player Card */
.player-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Status */
.status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: pulse 2s infinite;
}

.status.online .status-dot {
  background: var(--online);
  box-shadow: 0 0 8px var(--online);
}

.status.offline .status-dot {
  background: var(--offline);
  animation: none;
}

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

/* Listeners Counter */
.listeners {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15) 0%,
    rgba(139, 92, 246, 0.15) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.listeners.hidden {
  display: none;
}

.listeners-icon {
  font-size: 1.1rem;
}

.listeners-count {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent-hover);
  min-width: 24px;
  text-align: center;
}

.listeners-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Native audio (hidden but accessible) */
.player {
  width: 100%;
}

.player audio {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  outline: none;
}

/* Custom play button */
.controls {
  width: 100%;
}

.play-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.play-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.play-btn:active:not(:disabled) {
  transform: translateY(0);
}

.play-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.play-btn.playing {
  background: #374151;
}

.play-icon {
  font-size: 1.2rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Info Card */
.info-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.info-card h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.links a {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.links a:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Footer */
footer {
  text-align: center;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

footer a:hover {
  color: var(--text);
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .container {
    gap: 16px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .player-card {
    padding: 20px 16px;
  }

  .listeners {
    padding: 8px 16px;
  }
}
