@tailwind base;
@tailwind components;
@tailwind utilities;

/* 全局样式 */
:root {
  --primary-color: #3b82f6;
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --text-color: #1f2937;
  --text-secondary: #6b7280;
  --bg-color: #f9fafb;
  --border-color: #e5e7eb;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* 来电动画 */
@keyframes ring {
  0%, 100% {
    transform: rotate(-15deg);
  }
  50% {
    transform: rotate(15deg);
  }
}

.animate-ring {
  animation: ring 0.5s ease-in-out infinite;
}

/* 音波动画 */
.audio-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.audio-wave span {
  width: 4px;
  height: 16px;
  background-color: var(--primary-color);
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}

.audio-wave span:nth-child(2) {
  animation-delay: 0.1s;
}

.audio-wave span:nth-child(3) {
  animation-delay: 0.2s;
}

.audio-wave span:nth-child(4) {
  animation-delay: 0.3s;
}

.audio-wave span:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(2);
  }
}

/* 脉冲动画（来电） */
.pulse-ring {
  position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -20px;
  border: 3px solid var(--success-color);
  border-radius: 50%;
  animation: pulse-expand 1.5s ease-out infinite;
}

.pulse-ring::after {
  animation-delay: 0.5s;
}

@keyframes pulse-expand {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
