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

:root {
  --bg: #0a1a1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #f0fdfa;
  --text-secondary: #99f6e4;
  --text-muted: #5eead4;
  --accent: #2dd4bf;
  --danger: #f87171;
  --success: #4ade80;
}

body {
  font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* Animated chrome background */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}



/* Glass container */
.container {
  max-width: 520px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  z-index: 10;
  background: rgba(15, 23, 23, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.record-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.record-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-btn-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.record-btn:hover .record-btn-inner {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: scale(1.02);
}

.record-btn.recording .record-btn-inner {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.pulse-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--danger);
  opacity: 0;
  z-index: 1;
}

.record-btn.recording .pulse-ring {
  animation: pulse-out 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.record-btn.recording .pulse-ring.delay {
  animation-delay: 0.5s;
}

@keyframes pulse-out {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.record-btn:disabled {
  pointer-events: none;
}

.record-btn:disabled .record-btn-inner {
  opacity: 0.6;
}

.hidden {
  display: none !important;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.waveform {
  display: flex;
  gap: 4px;
  align-items: center;
  height: 32px;
}

.waveform span {
  width: 3px;
  height: 8px;
  background: var(--danger);
  border-radius: 2px;
  animation: wave 0.5s ease-in-out infinite;
}

.waveform span:nth-child(1) { animation-delay: 0s; }
.waveform span:nth-child(2) { animation-delay: 0.1s; }
.waveform span:nth-child(3) { animation-delay: 0.2s; }
.waveform span:nth-child(4) { animation-delay: 0.1s; }
.waveform span:nth-child(5) { animation-delay: 0s; }

@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 24px; opacity: 1; }
}

.status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 1.25rem;
  transition: color 0.2s;
  opacity: 0.7;
}

.status.recording {
  color: var(--danger);
  opacity: 1;
}

.transcription-container {
  margin-top: 2.5rem;
  animation: fade-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.transcription-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
}

.transcription {
  padding: 1.25rem 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
  max-height: 280px;
  overflow-y: auto;
}

.transcription::-webkit-scrollbar {
  width: 6px;
}

.transcription::-webkit-scrollbar-track {
  background: transparent;
}

.transcription::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.transcription-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.copy-btn.copied {
  background: rgba(74, 222, 128, 0.1);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--success);
}

@media (max-width: 480px) {
  .container {
    margin: 1rem;
    padding: 2rem;
  }
  
  header {
    margin-bottom: 2.5rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }

  .blob {
    filter: blur(60px);
  }
}
