/* src/styles/globals.css */
*, *:before, *:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0810;
  --bg-card: #13111b;
  --bg-card-2: #1a1727;
  --border: #a78bfa26;
  --text: #e2e0f0;
  --text-muted: #8b87a8;
  --purple: #a78bfa;
  --gold: #f59e0b;
  --pink: #ec4899;
  --green: #34d399;
  --red: #f87171;
  --blue: #60a5fa;
  --font-display: "Syne", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-ui: "DM Mono", monospace;
  --glow-purple: 0 0 20px #a78bfa66;
  --glow-gold: 0 0 20px #f59e0b66;
}

html, body {
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background: none;
  height: 100%;
}

body {
  background: var(--bg);
}

#root {
  height: 100%;
}

button {
  cursor: pointer;
  font-family: var(--font-ui);
  background: none;
  border: none;
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  border-color: #a78bfa66 !important;
}

.toast-container {
  position: fixed;
  display: flex;
  z-index: 9999;
  pointer-events: none;
  flex-direction: column-reverse;
  gap: 8px;
  min-width: 240px;
  max-width: 340px;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.toast {
  font-family: var(--font-ui);
  letter-spacing: .5px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text);
  animation: toastIn .3s ease forwards;
  text-align: center;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
}

.toast.info {
  border-color: #a78bfa66;
}

.toast.warn {
  color: var(--gold);
  border-color: #f59e0b80;
}

.toast.error {
  color: var(--red);
  border-color: #f8717180;
}

.toast.success {
  color: var(--green);
  border-color: #34d39980;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px)scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0)scale(1);
  }
}

.card-spotlight {
  position: relative;
  overflow: hidden;
}

.card-spotlight:before {
  content: "";
  position: absolute;
  background: radial-gradient(circle 250px at var(--mouse-x, -999px) var(--mouse-y, -999px), var(--spotlight-color, #a78bfa1f), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity .4s;
  inset: 0;
}

.card-spotlight:hover:before {
  opacity: 1;
}

.card-spotlight > * {
  position: relative;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .6;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: #a78bfa33;
  border-radius: 2px;
}

.mood-reaction {
  position: absolute;
  pointer-events: none;
  animation: floatUp 1.6s ease forwards;
  z-index: 10;
  font-size: 22px;
}

@keyframes floatUp {
  0% {
    opacity: 1;
    transform: translateY(0)scale(1);
  }

  60% {
    opacity: 1;
    transform: translateY(-40px)scale(1.2);
  }

  100% {
    opacity: 0;
    transform: translateY(-70px)scale(.8);
  }
}

.tama-shell {
  position: relative;
  z-index: 1;
  display: flex;
  background: linear-gradient(135deg, #2a2040 0%, #1a1530 30%, #110e1e 70%, #0d0b17 100%);
  border-radius: 60px 60px 100px 100px / 50px 50px 80px 80px;
  flex-direction: column;
  align-items:  center;
  gap: 0;
  width: 360px;
  height: min(96dvh, 720px);
  padding: 28px 22px 32px;
  box-shadow: 0 0 0 1px #a78bfa38, 0 0 0 3px #0009, 0 20px 60px #000c, 0 4px 16px #00000080, inset 0 1px #ffffff14, inset 0 -3px 12px #00000080;
}

.tama-shell:before {
  content: "";
  position: absolute;
  pointer-events: none;
  background: linear-gradient(#ffffff12 0%, #fff0 100%);
  border-radius: 40px 40px 60% 60%;
  height: 50px;
  top: 14px;
  left: 24px;
  right: 24px;
}

.tama-shell:after {
  content: "";
  position: absolute;
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
  background: #0000004d;
  border-radius: 0 0 80px 80px;
  height: 40px;
  bottom: 0;
  left: 10%;
  right: 10%;
}

.tama-topbar {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  width: 100%;
  margin-bottom: 16px;
  padding: 0 4px;
}

.tama-strap {
  background: radial-gradient(circle at 40% 35%, #1e1a2e, #0d0b17);
  border: 2px solid #a78bfa40;
  border-radius: 50%;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  box-shadow: inset 0 1px 3px #0009, 0 0 0 1px #0006;
}

.tama-topbar-center {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 4px;
}

.tama-brand {
  font-family: var(--font-display);
  letter-spacing: 3px;
  color: #a78bfa73;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
}

.tama-speaker {
  display: flex;
  align-items:  center;
  gap: 4px;
}

.tama-speaker span {
  background: #a78bfa2e;
  border-radius: 2px;
  width: 2.5px;
  height: 10px;
  box-shadow: inset 0 1px 2px #0006;
}

.tama-speaker span:nth-child(2), .tama-speaker span:nth-child(3) {
  height: 14px;
}

.tama-speaker span:nth-child(4) {
  height: 10px;
}

.tama-topbar-right {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 4px;
}

.tama-led {
  border-radius: 50%;
  width: 8px;
  height: 8px;
  box-shadow: inset 0 -1px 2px #0006;
}

.tama-led.alive {
  animation: pulse 2.5s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, #6ee7b7, #34d399);
  box-shadow: 0 0 8px #34d399, 0 0 16px #34d3994d;
}

.tama-led.warn {
  animation: pulse 1.2s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, #fde68a, #f59e0b);
  box-shadow: 0 0 6px #f59e0b;
}

.tama-led.danger {
  animation: pulse .7s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, #fcd34d, #f59e0b);
  box-shadow: 0 0 8px #f59e0b, 0 0 16px #f59e0b4d;
}

.tama-led.sleep {
  animation: pulse 3s ease-in-out infinite;
  background: radial-gradient(circle at 35% 35%, #93c5fd, #3b82f6);
  box-shadow: 0 0 8px #3b82f6, 0 0 16px #3b82f64d;
}

.tama-led.dead {
  background: radial-gradient(circle at 35% 35%, #fca5a5, #f87171);
  box-shadow: 0 0 6px #f87171;
}

.tama-led-label {
  font-family: var(--font-ui);
  letter-spacing: 1px;
  color: #a78bfa4d;
  text-transform: uppercase;
  font-size: 7px;
}

.tama-bezel {
  display: flex;
  background: #0a0810;
  border-radius: 16px;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 4px;
  box-shadow: 0 0 0 1px #000c, 0 0 0 3px #0f0d1a, 0 0 0 4px #a78bfa1f, inset 0 1px 3px #000000e6;
}

.tama-screen {
  overflow: hidden;
  display: flex;
  position: relative;
  background: #070510;
  border-radius: 12px;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 0;
  box-shadow: inset 0 2px 16px #000000e6, inset 0 0 0 1px #a78bfa14;
}

.tama-screen:after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(0deg, #0000, #0000 3px, #0000000a 3px 4px);
  border-radius: 12px;
  inset: 0;
}

.tama-nameplate {
  background: linear-gradient(90deg, #0000, #a78bfa33, #a78bfa66, #a78bfa33, #0000);
  border-radius: 1px;
  flex-shrink: 0;
  width: 80%;
  height: 1.5px;
  margin: 10px auto 2px;
}

.tama-btn-area {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

.tama-buttons {
  display: flex;
  justify-content: center;
  align-items:  flex-end;
  gap: 12px;
}

.tama-btn {
  display: flex;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  flex-direction: column;
  align-items:  center;
  gap: 5px;
  padding: 0;
  transition: opacity .15s;
}

.tama-btn-circle {
  display: flex;
  position: relative;
  border: 1.5px solid #ffffff0f;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 58px;
  height: 58px;
  transition: transform 80ms, box-shadow 80ms;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 12px #0009, 0 1px 3px #0006, inset 0 1px #ffffff14, inset 0 -2px 4px #0006;
}

.tama-btn[data-id="feed"] .tama-btn-circle {
  background: linear-gradient(145deg, #2a1e0f, #1a1208);
  border-color: #f59e0b4d;
}

.tama-btn[data-id="pet"] .tama-btn-circle {
  background: linear-gradient(145deg, #1e1630, #13101f);
  border-color: #a78bfa59;
}

.tama-btn[data-id="clean"] .tama-btn-circle {
  background: linear-gradient(145deg, #0f1a20, #091014);
  border-color: #60a5fa4d;
}

.tama-btn[data-id="explore"] .tama-btn-circle {
  background: linear-gradient(145deg, #0f2018, #091410);
  border-color: #34d3994d;
}

.tama-btn[data-id="coo"] .tama-btn-circle {
  background: linear-gradient(145deg, #1a1525, #110f1a);
  border-color: #e2e0f033;
}

.tama-btn[data-id="feed"] .tama-btn-circle:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 50% 0%, #f59e0b1f, #0000 60%);
  border-radius: 50%;
  inset: 0;
}

.tama-btn[data-id="pet"] .tama-btn-circle:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 50% 0%, #a78bfa26, #0000 60%);
  border-radius: 50%;
  inset: 0;
}

.tama-btn[data-id="clean"] .tama-btn-circle:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 50% 0%, #60a5fa1f, #0000 60%);
  border-radius: 50%;
  inset: 0;
}

.tama-btn[data-id="explore"] .tama-btn-circle:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 50% 0%, #34d3991f, #0000 60%);
  border-radius: 50%;
  inset: 0;
}

.tama-btn[data-id="coo"] .tama-btn-circle:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 50% 0%, #a78bfa14, #0000 60%);
  border-radius: 50%;
  inset: 0;
}

.tama-btn:active .tama-btn-circle, .tama-btn-circle.pressing {
  transform: translateY(2px)scale(.94);
  box-shadow: 0 1px 4px #000000b3, inset 0 2px 4px #0006;
}

.tama-btn:disabled, .tama-btn[disabled] {
  opacity: .28;
  cursor: not-allowed;
  pointer-events: none;
}

.tama-btn-label {
  font-family: var(--font-ui);
  letter-spacing: 1.5px;
  color: #a78bfa66;
  text-transform: uppercase;
  font-size: 8px;
}

.tama-bottom {
  display: flex;
  justify-content: space-between;
  width: 70%;
  margin-top: 18px;
}

.tama-bottom-dot {
  background: #0a0810;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  box-shadow: inset 0 1px 3px #000c, 0 0 0 1px #a78bfa1a;
}

@media (max-width: 400px) {
  .tama-shell {
    box-shadow: none;
    border-radius: 0;
    width: 100vw;
    height: 100dvh;
    padding: 16px 12px 20px;
  }
}

/* src/styles/aurora.css */
@keyframes aurora1 {
  0% {
    transform: translate(0)scale(1);
  }

  33% {
    transform: translate(8vw, -6vh)scale(1.1);
  }

  66% {
    transform: translate(-4vw, 10vh)scale(.95);
  }

  100% {
    transform: translate(0)scale(1);
  }
}

@keyframes aurora2 {
  0% {
    transform: translate(0)scale(1.05);
  }

  40% {
    transform: translate(-10vw, 8vh)scale(.9);
  }

  80% {
    transform: translate(6vw, -5vh)scale(1.1);
  }

  100% {
    transform: translate(0)scale(1.05);
  }
}

@keyframes aurora3 {
  0% {
    transform: translate(0)scale(.95);
  }

  50% {
    transform: translate(12vw, 6vh)scale(1.05);
  }

  100% {
    transform: translate(0)scale(.95);
  }
}

@keyframes aurora4 {
  0% {
    transform: translate(0)scale(1);
  }

  60% {
    transform: translate(-8vw, -10vh)scale(1.15);
  }

  100% {
    transform: translate(0)scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob {
    animation: none !important;
  }
}
