/* ── Chozha Voice – Custom Styles ─────────────────────────────── */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar (dark theme) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1e293b;
}
::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Code blocks */
pre, code {
  font-family: 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  border: 1px solid #1e293b;
}
code:not(pre code) {
  background: #1e293b;
  color: #f472b6;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

/* Animated gradient for hero section */
.hero-gradient {
  background: linear-gradient(-45deg, #0f172a, #1e3a5f, #312e81, #0f172a);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pulse animation for recording button */
.recording-pulse {
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(120%);
  animation: toast-in 0.35s ease forwards;
}
.toast.toast-out {
  animation: toast-out 0.3s ease forwards;
}
.toast-success {
  background: #059669;
  border-left: 4px solid #34d399;
}
.toast-error {
  background: #dc2626;
  border-left: 4px solid #f87171;
}
@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* Tab states */
.tab-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: #94a3b8;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn:hover {
  color: #e2e8f0;
}
.tab-btn.active {
  color: #818cf8;
  border-bottom-color: #818cf8;
}

/* Modal backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease;
}
.modal-backdrop.hidden {
  display: none;
}
.modal-content {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 32rem;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modal-scale-in 0.25s ease;
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Stat card hover */
.stat-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Loading spinner */
.spinner {
  border: 3px solid #334155;
  border-top: 3px solid #818cf8;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utility: fade-in for page content */
.fade-in {
  animation: fade-in 0.4s ease;
}

/* Table styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  border-bottom: 1px solid #334155;
}
.data-table td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
}
.data-table tbody tr:hover {
  background: #1e293b;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
