/* RoosterAI temel stilleri: sıfırlama ve ortak bileşenler. Renk, ölçü ve hareket değerleri css/tokens.css'tedir (önce bağlanmalı). */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; }

.icon-btn, .ghost {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--ink-2);
  transition: background-color 0.18s, color 0.18s;
}
.icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); }
.icon-btn:hover, .ghost:hover { background: var(--hover); color: var(--ink); }
.ghost { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; }
.ghost[data-state='done'] { color: var(--accent-ink); }
.ghost.is-busy { opacity: 0.5; cursor: progress; }
.ghost[data-state='failed'] { color: var(--danger); }
.mobile-only { display: none; }

/* Toast */
.toasts {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  z-index: var(--z-toast);
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 32px));
}
.toast {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  font-size: 14.5px;
  animation: toast-in 0.32s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Erişim kodu penceresi */
.gate {
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
}
.gate::backdrop { background: rgba(10, 8, 24, 0.55); backdrop-filter: blur(4px); }
.gate h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.02em; }
.gate p { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
.gate label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.gate input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.gate-msg { min-height: 22px; margin: 6px 0 0 !important; color: var(--danger) !important; font-size: 14px !important; }
.gate-go { width: 100%; min-height: 44px; margin-top: 8px; border: 0; border-radius: var(--r-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; }

@keyframes pulse { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
