:root {
  color-scheme: dark light;
  font-family: 'Inter', system-ui, sans-serif;
  background: #0e1015;
  color: #f5f7fa;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(88, 101, 242, 0.15), transparent 60%), #0e1015;
}

main {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.app-header,
.app-footer {
  padding: 1.5rem;
  background: rgba(12, 14, 19, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: none;
  margin-top: 2rem;
}

.auth-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.button,
button {
  appearance: none;
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  background: #5865f2;
  color: white;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.25);
}

button.danger {
  background: #ed4245;
}

.card {
  background: rgba(12, 14, 19, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 1.2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

input[type='text'],
input[type='url'] {
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 20, 27, 0.9);
  color: inherit;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.mic-status {
  margin: 0.2rem 0 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.mic-status[data-state='pending'] {
  background: rgba(249, 207, 92, 0.18);
  border-color: rgba(249, 207, 92, 0.35);
  color: #fcd34d;
}

.mic-status[data-state='active'] {
  background: rgba(59, 165, 93, 0.18);
  border-color: rgba(59, 165, 93, 0.35);
  color: #6ee7b7;
}

.mic-status[data-state='error'] {
  background: rgba(237, 66, 69, 0.18);
  border-color: rgba(237, 66, 69, 0.4);
  color: #fca5a5;
}

.slot,
.track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.4rem;
}

.track.current {
  background: rgba(88, 101, 242, 0.2);
}

.sub {
  font-size: 0.8rem;
  opacity: 0.7;
}

.host {
  font-size: 0.9rem;
  font-weight: 500;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-info .role {
  font-size: 0.8rem;
  opacity: 0.7;
}

.current-source {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 0.5rem;
}

.mode {
  font-size: 1rem;
}

code {
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 0.3rem;
}

#connection-status.online {
  color: #3ba55d;
}

#connection-status.offline {
  color: #ed4245;
}

@media (max-width: 640px) {
  .app-header,
  .app-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
