@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;510;590;680;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Authentic Linear Obsidian Palette */
  --color-canvas: #08090a;
  --color-panel: #0f1011;
  --color-card: #151618;
  --color-card-hover: #1b1c1f;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.14);
  
  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-tertiary: #8a8f98;
  --text-muted: #62666d;

  --accent-emerald: #22c55e;
  --accent-emerald-glow: rgba(34, 197, 94, 0.15);
  --accent-amber: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--color-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Surface styles */
.panel-surface {
  background-color: var(--color-panel);
  border: 1px solid var(--color-border);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7);
  transition: border-color 0.2s ease;
}

.card-item {
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-item:hover {
  background-color: var(--color-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
}

.input-well {
  background-color: var(--color-canvas);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.input-well:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  background-color: #0c0d0f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Smooth Entrance Animation */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-entrance {
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Live Value Pulse Effect */
@keyframes valuePulse {
  0% { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.6); }
  100% { color: var(--text-primary); text-shadow: none; }
}

.pulse-update {
  animation: valuePulse 1.2s ease-out;
}

/* Shimmer Loading Skeleton */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #151618 25%, #202226 50%, #151618 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

/* Touch feedback for mobile */
button:active {
  transform: scale(0.97);
}

/* Prevent iOS & Mobile browser auto-zoom when tapping inputs */
@media screen and (max-width: 768px) {
  input,
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="search"] {
    font-size: 16px !important;
  }
}

/* Hide scrollbar for clean horizontal chip carousel */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ========================================================
   PREMIUM TRIO EGG FADE ANIMATION (Cycle: 9s, 3s each)
   Used for Angels & Demons Divine 3-in-1 Pool
   ======================================================== */
@keyframes trioFade1 {
  0%, 28%, 100% { opacity: 1; transform: scale(1); }
  33.3%, 94.7% { opacity: 0; transform: scale(0.92); pointer-events: none; }
}

@keyframes trioFade2 {
  0%, 28%, 66.6%, 100% { opacity: 0; transform: scale(0.92); pointer-events: none; }
  33.3%, 61.3% { opacity: 1; transform: scale(1); }
}

@keyframes trioFade3 {
  0%, 61.3%, 100% { opacity: 0; transform: scale(0.92); pointer-events: none; }
  66.6%, 94.7% { opacity: 1; transform: scale(1); }
}

.trio-egg-1 {
  animation: trioFade1 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.trio-egg-2 {
  animation: trioFade2 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.trio-egg-3 {
  animation: trioFade3 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Synchronized Subtitle Text */
@keyframes trioText1 {
  0%, 28%, 100% { opacity: 1; transform: translateY(0); }
  33.3%, 94.7% { opacity: 0; transform: translateY(3px); }
}
@keyframes trioText2 {
  0%, 28%, 66.6%, 100% { opacity: 0; transform: translateY(3px); }
  33.3%, 61.3% { opacity: 1; transform: translateY(0); }
}
@keyframes trioText3 {
  0%, 61.3%, 100% { opacity: 0; transform: translateY(3px); }
  66.6%, 94.7% { opacity: 1; transform: translateY(0); }
}

.trio-text-1 {
  animation: trioText1 9s ease infinite;
}
.trio-text-2 {
  animation: trioText2 9s ease infinite;
}
.trio-text-3 {
  animation: trioText3 9s ease infinite;
}

/* Synchronized Indicator Dots */
@keyframes trioDot1 {
  0%, 28%, 100% { background-color: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.8); transform: scale(1.25); }
  33.3%, 94.7% { background-color: rgba(255, 255, 255, 0.18); box-shadow: none; transform: scale(1); }
}
@keyframes trioDot2 {
  0%, 28%, 66.6%, 100% { background-color: rgba(255, 255, 255, 0.18); box-shadow: none; transform: scale(1); }
  33.3%, 61.3% { background-color: #f87171; box-shadow: 0 0 6px rgba(248, 113, 113, 0.8); transform: scale(1.25); }
}
@keyframes trioDot3 {
  0%, 61.3%, 100% { background-color: rgba(255, 255, 255, 0.18); box-shadow: none; transform: scale(1); }
  66.6%, 94.7% { background-color: #c084fc; box-shadow: 0 0 6px rgba(192, 132, 252, 0.8); transform: scale(1.25); }
}

.trio-dot-1 {
  animation: trioDot1 9s ease infinite;
}
.trio-dot-2 {
  animation: trioDot2 9s ease infinite;
}
.trio-dot-3 {
  animation: trioDot3 9s ease infinite;
}

/* [REACHER+] reacher-scrollbar-web : สกรอลบาร์โทนเข้มทั้งเว็บ */
html { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px;
  border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
