/* mobile.css — چیدمان موبایل، HUD، Dashboard، ناوبری پایین */

/* --- Container کلی با احترام به Safe Area (نچ گوشی) --- */
.app-safe-area {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* --- صفحه ورود / ثبت‌نام --- */
.auth-screen {
  padding: 24px 20px;
  justify-content: center;
  gap: 20px;
}
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.auth-logo .emoji {
  font-size: 48px;
}
.auth-tabs {
  display: flex;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  min-height: 40px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-muted);
}
.auth-tab.is-active {
  background: var(--color-primary);
  color: #241708;
}
.auth-guest {
  text-align: center;
  margin-top: 8px;
}

/* --- Dashboard --- */
.dashboard-screen {
  padding: 20px 16px calc(90px + env(safe-area-inset-bottom));
  gap: 16px;
}
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--color-accent), var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.dashboard-header .header-info {
  flex: 1;
  min-width: 0;
}
.dashboard-header .name {
  font-weight: 700;
  font-size: 17px;
}
.dashboard-header .level-badge {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* --- نوار XP (Dashboard) --- */
.xp-bar-track {
  width: 100%;
  max-width: 220px;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 6px;
}
.xp-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transition: width 0.4s ease;
}
.xp-bar-label {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* --- دکمه‌ی روشن/خاموش‌کردن صدا --- */
.sound-toggle-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-row {
  display: flex;
  gap: 10px;
}
.stat-pill {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}

.cta-primary {
  min-height: 60px;
  font-size: 18px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.menu-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  min-height: var(--touch-target);
}
.menu-item .emoji { font-size: 26px; }

/* --- ناوبری پایین (Bottom Nav) --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav button {
  flex: 1;
  min-height: var(--touch-target);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}
.bottom-nav button.is-active {
  color: var(--color-accent);
}
.bottom-nav .emoji { font-size: 20px; }

/* --- Breakpoints: 320px تا 430px اولویت اصلی --- */
@media (min-width: 431px) {
  .auth-screen, .dashboard-screen {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}
@media (min-width: 769px) {
  body {
    background: #0d0a07;
  }
  #app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
}

/* هیچ اسکرول افقی مجاز نیست */
html, body, #app {
  max-width: 100vw;
  overflow-x: hidden;
}
