/* ============================================================
   AI Voice Podcast - Custom Styles
   ============================================================ */

/* Base */
* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Safe area for mobile */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

/* Toast animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b6bff, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Player progress bar hover */
.progress-hover:hover .progress-thumb {
  opacity: 1;
}

/* Glass morphism for header */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Transcript chat bubbles */
.transcript-bubble {
  position: relative;
}

.transcript-bubble::before {
  content: '';
  position: absolute;
  top: 12px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
}

.transcript-bubble.left::before {
  left: -4px;
  background: #f0f5ff;
}

.transcript-bubble.right::before {
  right: -4px;
  background: #f5f3ff;
}

/* Pulse animation for recording indicator */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 107, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(59, 107, 255, 0);
  }
}

.pulse-glow {
  animation: pulse-glow 2s infinite;
}

/* Category card hover effect */
.category-card:hover {
  transform: translateY(-2px);
}

/* Episode card entrance animation */
@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.episode-card-enter {
  animation: cardEntrance 0.3s ease-out;
}

/* Mobile bottom nav safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav-safe {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-title {
    font-size: 1.5rem;
  }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
  /* Reserved for dark mode implementation */
}

/* Accessibility - Focus visible */
:focus-visible {
  outline: 2px solid #3b6bff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print styles */
@media print {
  header, nav, .fixed {
    display: none !important;
  }
  main {
    padding-bottom: 0 !important;
  }
}
