/* VietVoice Pro - Styles */
:root {
  --glass: rgba(10, 15, 25, 0.92);
  --glass-2: rgba(10, 15, 25, 0.78);
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 15% 10%, rgba(59, 130, 246, 0.18), rgba(0, 0, 0, 0)),
    radial-gradient(900px 600px at 85% 30%, rgba(99, 102, 241, 0.14), rgba(0, 0, 0, 0)),
    radial-gradient(900px 600px at 40% 95%, rgba(16, 185, 129, 0.10), rgba(0, 0, 0, 0)),
    #000;
  color: #e2e8f0;
}

.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.glass-panel.soft {
  background: var(--glass-2);
  border-color: var(--border-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

/* Voice cards */
.voice-card.active {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(59, 130, 246, 0.12);
}

.voice-item {
  position: relative;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.voice-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
}

.voice-item:hover::after {
  opacity: 1;
}

.voice-item:hover {
  transform: translateY(-1px);
}

/* Voice name */
.voice-name {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.15;
  max-width: 100%;
  display: block;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Desktop voice names */
@media (min-width: 1024px) {
  .voice-name {
    white-space: nowrap;
    word-break: keep-all;
    overflow-wrap: normal;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .voice-name.clamp-2 {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .voice-name::-webkit-scrollbar {
    height: 6px;
  }

  .voice-name::-webkit-scrollbar-track {
    background: transparent;
  }

  .voice-name::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
  }
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Background effects */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 550px at 20% 15%, rgba(56, 189, 248, 0.18), rgba(0, 0, 0, 0)),
    radial-gradient(900px 550px at 85% 20%, rgba(167, 139, 250, 0.16), rgba(0, 0, 0, 0)),
    radial-gradient(900px 650px at 45% 95%, rgba(34, 197, 94, 0.10), rgba(0, 0, 0, 0));
  opacity: .95;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.10;
}

/* Chip component */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(226, 232, 240, 0.90);
}

/* Brand gradient text */
.brand-glow {
  background: linear-gradient(90deg, rgba(59, 130, 246, 1), rgba(99, 102, 241, 1), rgba(168, 85, 247, 1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.5);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
}

.toast.info {
  border-color: rgba(59, 130, 246, 0.5);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Clone badge */
.badge-clone {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}