/* ============================================================
   360 ANDROID — android.css v1.0
   Full mobile-first design system for Galaxy Store APK
   Replaces desktop sidebar with bottom nav + Material-feel UI
   ============================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

/* ── CSS VARIABLES ── */
:root {
  /* Brand */
  --a: #3b82f6;
  --a2: #06b6d4;
  --a-rgb: 59,130,246;

  /* Surface */
  --bg: #f0f2f8;
  --surface: #ffffff;
  --surface2: #f5f7fc;
  --card: #ffffff;

  /* Text */
  --txt: #111827;
  --txt2: #374151;
  --mut: #6b7280;

  /* Border */
  --br: rgba(0,0,0,0.08);
  --br2: rgba(0,0,0,0.05);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.08);

  /* Layout */
  --nav-h: 64px;
  --header-h: 56px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── DARK MODE ── */
body.dark {
  --bg: #0a0c14;
  --surface: #12151f;
  --surface2: #0f1119;
  --card: #161a28;
  --txt: #f0f2ff;
  --txt2: #c9cde0;
  --mut: #6b7488;
  --br: rgba(255,255,255,0.07);
  --br2: rgba(255,255,255,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
}

/* ── THEMES ── */
body.theme-ocean    { --a: #3b82f6; --a2: #06b6d4; }
body.theme-midnight { --a: #0ea5e9; --a2: #6366f1; }
body.theme-sunset   { --a: #f97316; --a2: #ef4444; }
body.theme-mint     { --a: #10b981; --a2: #34d399; }
body.theme-neon     { --a: #a21caf; --a2: #ec4899; }
body.theme-mono     { --a: #6b7280; --a2: #9ca3af; }

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html {
  height: 100%;
  overflow: hidden; /* We scroll inner containers */
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--txt);
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ── APP SHELL ── */
#app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ── TOP HEADER ── */
#app-header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--br);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 40;
  position: relative;
}

.header-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
  background: linear-gradient(120deg, var(--a), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--surface2);
  color: var(--txt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s;
}
.header-icon-btn:active { background: var(--br); }

/* ── PAGE CONTENT AREA ── */
#page-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}

/* ── BOTTOM NAV ── */
#bottom-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--br);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  z-index: 50;
  position: relative;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--mut);
  transition: color 0.15s;
  padding: 8px 4px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab .nav-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}

.nav-tab .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
}

.nav-tab.active {
  color: var(--a);
}

.nav-tab.active .nav-icon {
  transform: scale(1.12) translateY(-1px);
}

.nav-tab::after {
  content: '';
  position: absolute;
  top: 6px;
  width: 20px;
  height: 3px;
  border-radius: 99px;
  background: var(--a);
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-tab.active::after {
  opacity: 1;
}

/* ── MORE DRAWER (replaces sidebar for extra pages) ── */
#more-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

#more-drawer.open {
  pointer-events: auto;
}

#more-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.25s;
}
#more-drawer.open #more-drawer-backdrop {
  opacity: 1;
}

#more-drawer-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.32,.72,0,1);
  max-height: 75dvh;
  overflow-y: auto;
}
#more-drawer.open #more-drawer-sheet {
  transform: translateY(0);
}

.drawer-handle {
  width: 36px; height: 4px;
  border-radius: 99px;
  background: var(--br);
  margin: 0 auto 20px;
}

.drawer-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mut);
  margin-bottom: 12px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer;
  border: 1px solid var(--br);
  text-decoration: none;
  color: var(--txt);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.drawer-item:active { background: var(--br); }
.drawer-item .di-icon { font-size: 24px; }
.drawer-item .di-label { font-size: 12px; font-weight: 600; color: var(--txt2); }

/* ── PAGES ── */
.page { display: none; }
.page.active { display: block; }

/* ── HOME PAGE ── */
.home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 20px;
  gap: 20px;
  min-height: 100%;
}

.home-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.home-clock {
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--br);
  box-shadow: var(--shadow-sm);
}

.home-weather {
  font-size: 13px;
  font-weight: 600;
  color: var(--mut);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--br);
  box-shadow: var(--shadow-sm);
}

.home-logo-wrap {
  text-align: center;
  padding: 12px 0;
}

.home-logo {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1;
  background: linear-gradient(135deg, var(--a), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-tagline {
  font-size: 14px;
  color: var(--mut);
  font-weight: 500;
  margin-top: 6px;
}

/* ── SEARCH BAR (Android-native feel) ── */
.search-bar-wrap {
  width: 100%;
  max-width: 480px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--br);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--a);
  box-shadow: 0 0 0 3px rgba(var(--a-rgb),.12), var(--shadow);
}

.search-bar-icon {
  padding: 0 12px 0 18px;
  font-size: 18px;
  color: var(--mut);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  padding: 16px 4px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-family: inherit;
  color: var(--txt);
  caret-color: var(--a);
}

.search-bar input::placeholder { color: var(--mut); }

.search-bar-btn {
  flex-shrink: 0;
  margin: 6px 6px 6px 0;
  padding: 10px 20px;
  border-radius: 22px;
  border: none;
  background: linear-gradient(120deg, var(--a), var(--a2));
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .02em;
}
.search-bar-btn:active { opacity: 0.85; }

/* ── QUICK TILES (home shortcuts) ── */
.quick-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 480px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 14px 8px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--br);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  color: var(--txt);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.quick-tile:active {
  transform: scale(0.95);
  box-shadow: none;
}
.quick-tile .qt-icon { font-size: 22px; }
.quick-tile .qt-label { font-size: 11px; font-weight: 600; color: var(--mut); }

/* ── MUSIC STRIP ── */
.music-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--br);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.music-strip-icon { font-size: 20px; color: var(--a); }
.music-strip-label { font-size: 13px; font-weight: 600; flex: 1; color: var(--txt2); }

.music-toggle-btn {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--a);
  background: transparent;
  color: var(--a);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--br);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--txt);
}

.section-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--a);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

/* ── SEARCH PAGE ── */
.search-page {
  padding: 0;
}

.search-page-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--br);
  padding: 12px 16px;
}

.search-bar-compact {
  display: flex;
  align-items: center;
  background: var(--surface2);
  border: 1.5px solid var(--br);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-bar-compact:focus-within { border-color: var(--a); }

.search-bar-compact input {
  flex: 1;
  padding: 12px 12px 12px 16px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: var(--txt);
  caret-color: var(--a);
}

.search-bar-compact-btn {
  padding: 10px 16px;
  border: none;
  background: var(--a);
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.search-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
}

.search-tab-btn {
  padding: 8px 16px;
  border-radius: 99px;
  border: none;
  background: var(--surface2);
  color: var(--mut);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.search-tab-btn.active {
  background: var(--a);
  color: white;
}

.search-results-body {
  padding: 16px;
}

/* Search result card */
.result-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--br);
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.result-card:active { transform: scale(0.98); }

.result-card-url {
  font-size: 11px;
  color: var(--mut);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--a);
  margin-bottom: 4px;
  line-height: 1.3;
}

.result-card-snippet {
  font-size: 13px;
  color: var(--txt2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image grid */
.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 16px;
}

.image-grid-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface2);
  cursor: pointer;
}

.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Knowledge panel */
.knowledge-panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--br);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.kp-title { font-size: 20px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.kp-type { font-size: 12px; color: var(--mut); margin-bottom: 10px; }
.kp-desc { font-size: 13px; color: var(--txt2); line-height: 1.6; }

/* Loader */
.search-loader {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--mut);
}
.search-loader.visible { display: block; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--br);
  border-top-color: var(--a);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── GAMES PAGE ── */
.games-page { padding: 16px; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.game-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--br);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.game-card:active { transform: scale(0.96); box-shadow: none; }

.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--a), var(--a2));
}

.game-card-icon { font-size: 36px; }
.game-card-name { font-size: 13px; font-weight: 700; color: var(--txt); text-align: center; }
.game-card-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--a);
  background: rgba(var(--a-rgb),.1);
  padding: 2px 8px;
  border-radius: 99px;
}

/* ── AI PAGE ── */
.ai-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.ai-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.ai-bubble.user {
  align-self: flex-end;
  background: var(--a);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-bubble.assistant {
  align-self: flex-start;
  background: var(--card);
  color: var(--txt);
  border: 1px solid var(--br);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.ai-input-bar {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--br);
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.ai-textarea {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--br);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--txt);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s;
}
.ai-textarea:focus { border-color: var(--a); }

.ai-send-btn {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: none;
  background: var(--a);
  color: white;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-send-btn:active { opacity: 0.8; }

/* ── SETTINGS PAGE ── */
.settings-page { padding: 16px; }

.settings-group {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--br);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.settings-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mut);
  padding: 14px 16px 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--br2);
  gap: 12px;
}

.settings-row:first-of-type { border-top: none; }

.settings-row-left { flex: 1; }
.settings-row-label { font-size: 15px; font-weight: 500; color: var(--txt); }
.settings-row-sub { font-size: 12px; color: var(--mut); margin-top: 1px; }

/* Toggle switch */
.toggle-switch {
  width: 50px; height: 28px;
  border-radius: 99px;
  background: var(--mut);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  border: none;
  -webkit-tap-highlight-color: transparent;
}
.toggle-switch.on { background: var(--a); }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  top: 3px; left: 3px;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on::after { transform: translateX(22px); }

/* Theme swatches */
.theme-swatch-row {
  display: flex;
  gap: 10px;
  padding: 8px 16px 14px;
  flex-wrap: wrap;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.swatch-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.theme-swatch.active .swatch-circle {
  border-color: var(--txt);
  transform: scale(1.1);
}

.swatch-label { font-size: 10px; font-weight: 600; color: var(--mut); }

/* Settings link row */
.settings-link-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--br2);
  gap: 12px;
  text-decoration: none;
  color: var(--txt);
  cursor: pointer;
}
.settings-link-row:first-of-type { border-top: none; }
.settings-link-icon { font-size: 18px; }
.settings-link-text { flex: 1; font-size: 15px; font-weight: 500; }
.settings-link-chevron { color: var(--mut); font-size: 14px; }

/* ── SPLASH SCREEN ── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050816;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: opacity 0.5s ease;
}
#splash.fade { opacity: 0; pointer-events: none; }

.splash-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 96px;
  font-weight: 900;
  color: white;
  letter-spacing: -.01em;
  opacity: 0;
  line-height: 1;
}

@keyframes splashIn {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}
.splash-anim { animation: splashIn 0.45s cubic-bezier(.22,.68,0,1.1) forwards; }

/* ── AUTH SHEET ── */
#auth-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
#auth-sheet.open { pointer-events: auto; }

#auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.25s;
}
#auth-sheet.open #auth-backdrop { opacity: 1; }

#auth-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 20px 24px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.32,.72,0,1);
}
#auth-sheet.open #auth-panel { transform: translateY(0); }

.auth-panel-title { font-size: 20px; font-weight: 700; color: var(--txt); margin-bottom: 20px; text-align: center; }

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--br);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--txt);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.auth-input:focus { border-color: var(--a); }

.auth-btn-primary {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(120deg, var(--a), var(--a2));
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 10px;
}

.oauth-row { display: flex; gap: 10px; margin-top: 4px; }

.oauth-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--br);
  background: var(--surface2);
  color: var(--txt);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.auth-error { color: #ef4444; font-size: 13px; margin-top: 8px; text-align: center; min-height: 18px; }
.auth-close-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: none;
  border: none;
  color: var(--mut);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* ── IFRAME VIEWER (for games, etc.) ── */
#iframe-viewer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #000;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.32,.72,0,1);
}
#iframe-viewer.open { transform: translateY(0); }

.iframe-header {
  height: 48px;
  background: #111;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.iframe-close-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iframe-title { color: white; font-size: 14px; font-weight: 600; flex: 1; }

.iframe-viewer-frame {
  flex: 1;
  border: none;
  width: 100%;
  height: 100%;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 0; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--mut);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--txt); margin-bottom: 8px; }
.empty-state-text { font-size: 14px; line-height: 1.6; }

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--txt);
  color: var(--surface);
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
}

@keyframes toastIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { to { opacity:0; transform:translateY(8px); } }

/* ── USER CHIP (profile pill in header) ── */
.user-chip-android {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--surface2);
  border: 1px solid var(--br);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
}

.user-chip-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--a2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.user-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── MISC UTILITIES ── */
.gradient-text {
  background: linear-gradient(120deg, var(--a), var(--a2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── ANIMATIONS ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page.active {
  animation: fadeSlideIn 0.2s ease;
}
