/* Rubik — הפונט הראשי: עגול, ידידותי ותומך בעברית (רישיון SIL OFL, assets/fonts/RUBIK-LICENSE.txt).
   Outfit נשאר למספרים ולכותרות באנגלית. שניהם מקומיים — בלי Google Fonts. */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/rubik-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/rubik-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/rubik-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Outfit מקומי (במקום Google Fonts — ה-@import החיצוני עיכב כל טעינת דף).
   פונט משתנה: קובץ אחד לכל המשקלים. רישיון SIL OFL. אין בו עברית — העברית נופלת לפונט המערכת. */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── פלטה: צבעי עולם הפוקימונים (אדום פוכדור, צהוב פיקאצ'ו, כחול שמיים) על כחול-לילה ──
   בכוונה בלי גרדיאנט סגול-אינדיגו ובלי "זכוכית" שקופה — זה המראה הגנרי שרצינו לעזוב. */
:root {
  --bg-primary:   #0e1a38;   /* רקע הדף (מתחת לגרדיאנט) */
  --bg-secondary: #151f38;   /* שדות, פאנלים */
  --bg-tertiary:  #1e2a48;   /* צ'יפים, כפתור משני */
  --surface:      #131c33;   /* כרטיסים */
  --surface-hi:   #1a2542;

  --text-primary:   #f4f6fb;
  --text-secondary: #98a4c0;

  --accent-primary:   #ff4d3d;   /* אדום פוכדור — פעולה ראשית, מצב פעיל */
  --accent-dark:      #c7301f;
  --accent-secondary: #ffcb05;   /* צהוב — Silver, XP, הדגשות */
  --accent-blue:      #3b8cff;
  --accent-glow: rgba(255, 77, 61, 0.28);
  --highlight:   #ffd84d;

  --success: #22c55e;
  --danger:  #ef4444;
  --warning: #f59e0b;

  --glass-bg:     var(--surface);
  --glass-border: #243154;
  --glass-shadow: 0 6px 18px rgba(3, 7, 18, 0.35);

  --font-main: 'Rubik', 'Outfit', system-ui, sans-serif;
  --font-num:  'Outfit', 'Rubik', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* hidden תמיד מסתיר — גם כשלאלמנט יש display משלו (אחרת מפת הקרב נשארה פתוחה באמצע קרב) */
[hidden] { display: none !important; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  direction: rtl; /* Hebrew */
  line-height: 1.5;
  /* רקע "פוקימוני": כחול עמוק (לא שחור) עם דוגמת פוכדורים עדינה */
  background-image:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(80, 150, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgba(255, 77, 61, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 35% at 0% 70%, rgba(255, 203, 5, 0.06), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg opacity='.07'%3E%3Cg transform='rotate%28-18 60 64%29' fill='none' stroke='white' stroke-width='3.8'%3E%3Ccircle cx='60' cy='64' r='34'/%3E%3Cpath d='M26 64h21.1M72.9 64h21.1'/%3E%3Ccircle cx='60' cy='64' r='10.2'/%3E%3C/g%3E%3Cg transform='rotate%2824 178 170%29' fill='none' stroke='white' stroke-width='2.4'%3E%3Ccircle cx='178' cy='170' r='22'/%3E%3Cpath d='M156 170h13.6M186.4 170h13.6'/%3E%3Ccircle cx='178' cy='170' r='6.6'/%3E%3C/g%3E%3Cg transform='rotate%2810 186 40%29' fill='none' stroke='white' stroke-width='2.0'%3E%3Ccircle cx='186' cy='40' r='12'/%3E%3Cpath d='M174 40h7.4M190.6 40h7.4'/%3E%3Ccircle cx='186' cy='40' r='3.6'/%3E%3C/g%3E%3Cg transform='rotate%28-30 46 196%29' fill='none' stroke='white' stroke-width='2.0'%3E%3Ccircle cx='46' cy='196' r='14'/%3E%3Cpath d='M32 196h8.7M51.3 196h8.7'/%3E%3Ccircle cx='46' cy='196' r='4.2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #16295a 0%, #10204a 45%, #0c1733 100%);
  background-size: auto, auto, auto, 240px 240px, auto;
  background-attachment: fixed;
}

::selection { background: rgba(255, 203, 5, 0.35); }

a { color: inherit; }

/* פאנל — היה "זכוכית"; עכשיו משטח אטום עם גבול ברור */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
}

/* ── כפתורים: "משחקיים" — צבע מלא וקצה תחתון כהה, נלחצים פנימה ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-bottom: 3px solid rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease, background .15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover  { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); border-bottom-width: 1px; }

.btn-primary {
  background: var(--accent-primary);
  border-bottom-color: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-color: #0f172c;
  box-shadow: inset 0 0 0 1px var(--glass-border);
}
.btn-secondary:hover { background: #26345a; }

/* Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.input-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.input-group input {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(255, 203, 5, 0.18);
}

/* Layout Helpers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* Micro-animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: #18223d;
  border: 1px solid var(--glass-border);
  padding: 12px 18px;
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  animation: slideInLeft 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}

.toast.error { border-right: 4px solid var(--danger); }
.toast.success { border-right: 4px solid var(--success); }

@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(-100%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
