/*
 * Pharoah Ancient Egyptian Tech Theme & Sacred-Circuit Chrome
 * Obsidian (#06080E), 24K Sovereign Gold (#F59E0B / #FDE68A), Lapis Hologram Cyan (#38BDF8), Scarab Emerald (#10B981)
 */
:root,
html,
html[data-pack],
html[data-persona] {
  color-scheme: dark !important;
  --pharoah-obsidian: #06080e;
  --pharoah-navy: #0a0f1c;
  --pharoah-card: #0e1526;
  --pharoah-card-2: #151f36;
  --pharoah-gold: #f59e0b;
  --pharoah-gold-bright: #fde68a;
  --pharoah-gold-deep: #b45309;
  --pharoah-cyan: #38bdf8;
  --pharoah-emerald: #10b981;
  --pharoah-crimson: #ef4444;

  --bg: #06080e !important;
  --surface: #0c1222 !important;
  --surface-2: #131d34 !important;
  --ink: #f8fafc !important;
  --ink-2: #cbd5e1 !important;
  --muted: #94a3b8 !important;
  --line: rgba(245, 158, 11, 0.34) !important;
  --control-edge: rgba(245, 158, 11, 0.65) !important;
  --accent: #f59e0b !important;
  --on-accent: #06080e !important;
  --accent-ink: #fde68a !important;
  --accent-soft: rgba(245, 158, 11, 0.16) !important;
  --on-accent-soft: #fde68a !important;
  --accent-2: #38bdf8 !important;
  --on-accent-2: #06080e !important;
  --accent-2-ink: #7dd3fc !important;
  --tint-a: rgba(245, 158, 11, 0.12) !important;
  --tint-b: rgba(56, 189, 248, 0.12) !important;
}

body {
  background-color: #06080e !important;
  background-image:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(245, 158, 11, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 45% at 88% 92%, rgba(56, 189, 248, 0.12), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23f59e0b' stroke-opacity='0.09' stroke-width='1'%3E%3Cpath d='M48 6L88 76H8z'/%3E%3Cpath d='M48 24L72 66H24z' stroke='%2338bdf8' stroke-opacity='0.08'/%3E%3Cpath d='M0 48h16l8-8h48l8 8h16M48 0v6M48 76v20'/%3E%3Ccircle cx='48' cy='48' r='3' fill='%23f59e0b' fill-opacity='0.14'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-attachment: fixed !important;
  color: #f8fafc !important;
}

/* Pharoah Sovereign Cyber-Temple Top Navigation */
.pharoah-studio-bar {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(6, 8, 14, 0.97) 0%, rgba(11, 17, 32, 0.94) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(245, 158, 11, 0.65);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.78), 0 1px 18px rgba(245, 158, 11, 0.18);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.pharoah-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fde68a;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.pharoah-brand-emblem {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(145deg, #090d18 0%, #17213a 100%);
  border: 1.5px solid #f59e0b;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45), inset 0 0 10px rgba(56, 189, 248, 0.2);
}

.pharoah-game-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
}

.pharoah-game-nav a {
  text-decoration: none;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: linear-gradient(160deg, rgba(16, 24, 43, 0.94), rgba(8, 12, 22, 0.96));
  transition: all 0.16s ease;
  white-space: nowrap;
}

.pharoah-lang-pills {
  flex-shrink: 0;
}

@media (max-width: 820px) {
  .pharoah-game-nav {
    order: 3;
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .pharoah-game-nav::-webkit-scrollbar { display: none; }
}

.pharoah-game-nav a:hover,
.pharoah-game-nav a.active {
  color: #06080e;
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
  border-color: #fde68a;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.55);
}

.pharoah-lang-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 15, 28, 0.95);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.pharoah-lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pharoah-lang-btn:hover { color: #fde68a; }
.pharoah-lang-btn.active {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
  color: #06080e;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
}

/* Sacred Obsidian & Gold Bevel Cards */
.fk-card,
.mg-section,
.fkart-menu,
.fkart-lobby,
.fkart-over {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 24, 43, 0.95) 0%, rgba(7, 10, 19, 0.98) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(253, 230, 138, 0.2),
    inset 0 -1px 0 rgba(56, 189, 248, 0.16) !important;
  border-radius: 12px !important;
}

.fk-btn--primary {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 65%, #d97706 100%) !important;
  color: #06080e !important;
  border: 1.5px solid #fef3c7 !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

.fk-btn--secondary,
.fk-chip,
.fk-seg button {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(245, 158, 11, 0.36) !important;
}

.fk-seg button[aria-checked="true"],
.fk-chip[aria-pressed="true"] {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #06080e !important;
  border-color: #fde68a !important;
  font-weight: 850 !important;
}

/* Override Family OS top/bottom shell bars to Ancient Egyptian Tech */
.fos-shell-top,
.fos-shell-tabs {
  background: rgba(6, 8, 14, 0.95) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fde68a !important;
}

.fos-shell-tab[aria-current="page"] {
  color: #fde68a !important;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.fos-game-top h1,
.fk-h1,
.fk-h2,
h1, h2 {
  color: #fde68a !important;
  text-shadow: 0 2px 16px rgba(245, 158, 11, 0.25);
}

/* Hide legacy Moochi helper bubble if mounted so it doesn't clutter the Egyptian Tech HUD */
.moochi-dock,
.fos-moochi,
#moochiHost {
  display: none !important;
}
