@tailwind base;
@tailwind components;
@tailwind utilities;

.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.pulse-anim {
  animation: pulse 2s ease-in-out infinite;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #667eea, #764ba2);
  border-radius: 4px;
}
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.2;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}
@keyframes scale-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bounce-subtle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.25);
  }
}
@keyframes spin-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes bar-1 {
  0%,
  100% {
    height: 20%;
  }
  50% {
    height: 80%;
  }
}
@keyframes bar-2 {
  0%,
  100% {
    height: 40%;
  }
  50% {
    height: 100%;
  }
}
@keyframes bar-3 {
  0%,
  100% {
    height: 60%;
  }
  50% {
    height: 30%;
  }
}
@keyframes bar-4 {
  0%,
  100% {
    height: 30%;
  }
  50% {
    height: 90%;
  }
}
@keyframes bar-5 {
  0%,
  100% {
    height: 50%;
  }
  50% {
    height: 20%;
  }
}
@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
.voice-pulse-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: pulse-ring 2s ease-in-out infinite;
  pointer-events: none;
}
.voice-pulse-ring:nth-child(2) {
  animation-delay: 0.3s;
}
.voice-pulse-ring:nth-child(3) {
  animation-delay: 0.6s;
}
.voice-status-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 32px;
}
.voice-status-bar span {
  width: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  transition: height 0.15s ease;
}
.voice-bar-animate span:nth-child(1) {
  animation: bar-1 0.8s ease-in-out infinite;
}
.voice-bar-animate span:nth-child(2) {
  animation: bar-2 0.9s ease-in-out infinite 0.1s;
}
.voice-bar-animate span:nth-child(3) {
  animation: bar-3 0.7s ease-in-out infinite 0.2s;
}
.voice-bar-animate span:nth-child(4) {
  animation: bar-4 0.85s ease-in-out infinite 0.15s;
}
.voice-bar-animate span:nth-child(5) {
  animation: bar-5 0.75s ease-in-out infinite 0.25s;
}
.voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 60px;
}
.voice-waveform canvas {
  border-radius: 8px;
  width: 100%;
  height: 100%;
}
.voice-menu-scroll::-webkit-scrollbar {
  width: 4px;
}
.voice-menu-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.voice-menu-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.voice-volume-meter {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.voice-volume-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  transition: width 0.1s ease;
}
.voice-vad-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background 0.15s ease;
}
.voice-3d-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.voice-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
}
#voice-overlay {
  padding: clamp(0.5rem, 2vw, 1.5rem);
}
#voice-status-text {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.1;
  text-wrap: balance;
}
#voice-transcript-box {
  width: min(92vw, 42rem);
  max-height: 20vh;
  overflow-y: auto;
}
#voice-conversation-box {
  width: min(94vw, 44rem);
  max-height: 30vh;
  overflow-y: auto;
}
#voice-bottom-controls {
  padding-bottom: clamp(0.5rem, 4vh, 2rem);
}
.voice-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
}
.voice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ff00;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
}
.voice-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00ff00;
  cursor: pointer;
  border: none;
}
.voice-age-btn {
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
  font-family: "JetBrains Mono", monospace;
}
.voice-age-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
}
.voice-age-btn.active {
  background: rgba(0, 255, 0, 0.1);
  border-color: rgba(0, 255, 0, 0.3);
  color: #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.15);
}
.voice-controls-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.voice-controls-panel label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.voice-scroll-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(0.5rem, 2vw, 1.5rem);
  -webkit-overflow-scrolling: touch;
}
.voice-scroll-area::-webkit-scrollbar {
  width: 4px;
}
.voice-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.voice-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
@media (max-width: 640px) {
  #voice-mic-btn {
    width: 5rem;
    height: 5rem;
  }
  #voice-cancel-btn {
    width: 3rem;
    height: 3rem;
  }
}
