:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg-dark: #0f0f23;
  --bg-card: #1a1a2e;
  --bg-elevated: #25253d;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border: #334155;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.logo {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  background: var(--bg-elevated);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
}

.status.connected .status-dot {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: blink 1s infinite;
}

.status.broadcasting .status-dot {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
  animation: blink 0.5s infinite;
}

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

.ptt-button {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    0 10px 40px rgba(99, 102, 241, 0.4),
    inset 0 -5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.ptt-button:hover {
  transform: scale(1.05);
  box-shadow: 
    0 15px 50px rgba(99, 102, 241, 0.5),
    inset 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.ptt-button:active,
.ptt-button.active {
  transform: scale(0.95);
  background: linear-gradient(145deg, var(--danger), #dc2626);
  box-shadow: 
    0 5px 20px rgba(239, 68, 68, 0.5),
    inset 0 5px 20px rgba(0, 0, 0, 0.3);
}

.ptt-button .icon {
  font-size: 2.5rem;
}

.listener-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.listener-icon.active {
  opacity: 1;
  animation: listening 1s infinite;
}

@keyframes listening {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.audio-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 60px;
  margin: 1.5rem 0;
}

.audio-bar {
  width: 6px;
  height: 20px;
  background: var(--primary);
  border-radius: 3px;
  transition: height 0.1s ease;
}

.audio-visualizer.active .audio-bar {
  animation: audioWave 0.5s infinite ease-in-out;
}

.audio-bar:nth-child(1) { animation-delay: 0s; }
.audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bar:nth-child(5) { animation-delay: 0.4s; }
.audio-bar:nth-child(6) { animation-delay: 0.3s; }
.audio-bar:nth-child(7) { animation-delay: 0.2s; }
.audio-bar:nth-child(8) { animation-delay: 0.1s; }

@keyframes audioWave {
  0%, 100% { height: 20px; background: var(--primary); }
  50% { height: 50px; background: var(--success); }
}

.info {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.info p {
  margin: 0.5rem 0;
}

.listeners-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border-radius: 20px;
  font-size: 0.9rem;
}

.btn-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--primary);
}

.volume-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.volume-control input[type="range"] {
  width: 150px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
  outline: none;
  -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}

.error-message {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 1rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-size: 0.9rem;
}
