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

:root {
  --foreground-rgb: 0, 0, 0;
  --background-start-rgb: 250, 250, 250;
  --background-end-rgb: 255, 255, 255;
  --primary-glow: conic-gradient(
    from 180deg at 50% 50%,
    #42669933 0deg,
    #42669933 55deg,
    #42669933 120deg,
    #42669933 160deg,
    transparent 360deg
  );
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-rgb: 255, 255, 255;
    --background-start-rgb: 17, 24, 39;
    --background-end-rgb: 13, 17, 23;
    --primary-glow: radial-gradient(
      rgba(66, 102, 153, 0.4),
      rgba(66, 102, 153, 0)
    );
  }
}

body {
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(
    to bottom,
    rgb(var(--background-start-rgb)),
    rgb(var(--background-end-rgb))
  );
  min-height: 100vh;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 20px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 163, 175, 0.7);
  border: 2px solid transparent;
  background-clip: content-box;
}

@media (prefers-color-scheme: dark) {
  ::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
    border: 2px solid transparent;
    background-clip: content-box;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
    border: 2px solid transparent;
    background-clip: content-box;
  }
}

/* Message animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-animate {
  animation: slideIn 0.3s ease-out forwards;
}

/* Loading animation */
@keyframes typing {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

.typing-dot {
  animation: typing 1.4s infinite;
  animation-fill-mode: both;
}

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

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

/* Button and input styles */
.button-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-hover:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button-hover:active:not(:disabled) {
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  .button-hover:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

/* Focus styles */
input:focus,
button:focus {
  outline: none;
  ring-color: rgb(59, 130, 246);
  ring-offset-color: rgb(255, 255, 255);
}

@media (prefers-color-scheme: dark) {
  input:focus,
  button:focus {
    ring-offset-color: rgb(17, 24, 39);
  }
}

/* Glass effect for containers */
.glass-effect {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: dark) {
  .glass-effect {
    background: rgba(0, 0, 0, 0.2);
  }
}

/* Responsive font sizes */
@media screen and (max-width: 640px) {
  html {
    font-size: 14px;
  }
}

@media screen and (min-width: 1280px) {
  html {
    font-size: 16px;
  }
}
