/* Ultra-Premium Apple macOS & iOS iMessage Design System */

@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Inter", sans-serif;
  
  /* Apple Palette */
  --apple-blue: #007AFF;
  --apple-blue-hover: #0063CC;
  --apple-blue-gradient: linear-gradient(180deg, #0A84FF 0%, #0066FF 100%);
  --apple-green: #34C759;
  --apple-gray-light: #E9E9EB;
  --apple-gray-dark: #262629;
  --apple-bg-light: #F2F2F7;
  --apple-bg-dark: #000000;
  --apple-sidebar-dark: rgba(20, 20, 22, 0.85);
  --apple-sidebar-light: rgba(246, 246, 248, 0.85);
  --apple-border-dark: rgba(255, 255, 255, 0.08);
  --apple-border-light: rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-apple);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--apple-bg-dark);
  color: #FFFFFF;
}

/* Glassmorphism Utilities */
.glass-mac {
  background: rgba(24, 24, 28, 0.75);
  backdrop-filter: blur(40px) saturate(190%);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
}

.glass-mac-header {
  background: rgba(18, 18, 20, 0.80);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.glass-card {
  background: rgba(28, 28, 32, 0.65);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* macOS Window Buttons (Traffic Lights) */
.mac-btn-red { background-color: #FF5F56; border: 0.5px solid #E0443E; }
.mac-btn-yellow { background-color: #FFBD2E; border: 0.5px solid #DEA123; }
.mac-btn-green { background-color: #27C93F; border: 0.5px solid #1AAB29; }

/* Custom iMessage Bubbles */
.bubble-sent {
  background: var(--apple-blue-gradient);
  color: #FFFFFF;
  border-radius: 20px 20px 4px 20px !important;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.bubble-received {
  background-color: #262629;
  color: #FFFFFF;
  border-radius: 20px 20px 20px 4px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[theme="light"] .bubble-received {
  background-color: #E9E9EB;
  color: #000000;
}

/* Typing Dots Animation */
@keyframes applePulseDot {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.3;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.typing-dot {
  animation: applePulseDot 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* Clean Spring Scale Animations */
@keyframes springPop {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  70% {
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-spring {
  animation: springPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-in {
  animation: scaleIn 0.2s ease-out forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
