/* ==========================================================================
   KINGDOMS AT WAR 👑⚔️ - MASTER COMPREHENSIVE DESIGN SYSTEM & STYLES
   ========================================================================== */

:root {
  --gold-button-bg: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%);
  --gold-button-border: #FFF0A5;
  --blue-button-bg: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  --blue-button-border: #3A6A92;
  --green-button-bg: linear-gradient(180deg, #538A2A 0%, #3B671B 100%);
  --green-button-border: #7BBD42;
  --red-button-bg: linear-gradient(180deg, #C0392B 0%, #7B241C 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; font-family: 'Cinzel', 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
body, html { position: fixed; inset: 0; width: 100%; height: 100%; width: 100dvw; height: 100dvh; overflow: hidden; background-color: #070A0F; color: #FFFFFF; touch-action: none; }

/* ── STARTUP LOADING SCREEN (FULLSCREEN OVERLAY) ───────────────────── */
#startup-loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  width: 100dvw;
  height: 100dvh;
  background: radial-gradient(circle at center, #0d1b2e 0%, #070a0f 80%, #020406 100%);
  z-index: 99999 !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 36px;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}
#startup-loading-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  z-index: 10;
}

.splash-presenter {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 800;
  color: #00F0FF;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.6), 0 0 30px rgba(0, 240, 255, 0.3);
  animation: presenterFade 2s ease-in-out infinite alternate;
}

@keyframes presenterFade {
  0% { opacity: 0.75; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(-2px); }
}

.splash-title {
  font-family: 'Cinzel', serif;
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(180deg, #FFF0A5 0%, #E5A93B 50%, #A66E14 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.5));
  letter-spacing: 4px;
  text-transform: uppercase;
}

.splash-dots {
  display: inline-block;
  color: #ffd700;
  -webkit-text-fill-color: #ffd700;
  animation: splashPulse 1.2s ease-in-out infinite;
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* DEVICE SELECTION STYLES */
#device-select-box {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(10, 16, 26, 0.85);
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(10px);
}

.device-select-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.device-buttons-row {
  display: flex;
  gap: 20px;
}

.device-btn {
  width: 180px;
  padding: 16px 12px;
  background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  border: 2px solid #3A6A92;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.device-btn:hover {
  transform: translateY(-5px) scale(1.04);
  border-color: #FFD700;
  background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}

.device-btn:hover .device-label, .device-btn:hover .device-sub {
  color: #FFFFFF !important;
}

.device-icon {
  font-size: 38px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.device-label {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 900;
  color: #FFD700;
  letter-spacing: 1px;
}

.device-sub {
  font-size: 10px;
  color: #A0B2C6;
  font-weight: bold;
  text-align: center;
  line-height: 1.2;
}

.spinner-overlay-container {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.spinner-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  animation: spinCircle 1.5s linear infinite;
}

.spinner-track { stroke: rgba(0, 240, 255, 0.15); }
.spinner-circle { stroke: #00F0FF; stroke-dasharray: 125; stroke-dashoffset: 40; stroke-linecap: round; filter: drop-shadow(0 0 10px #00F0FF); }

@keyframes spinCircle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-inner-text {
  position: absolute;
  font-size: 9px;
  font-weight: 900;
  color: #00F0FF;
  letter-spacing: 1px;
  font-family: 'Inter', sans-serif;
  text-shadow: 0 0 8px #00F0FF;
}

/* GLOBAL TOP HUD BAR */
.top-hud-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  z-index: 100;
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.95) 0%, rgba(7, 10, 15, 0) 100%);
}

.hud-left-group { display: flex; align-items: center; gap: 12px; }

.nav-back-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  border: 2px solid #FFD700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  transition: transform 0.2s, border-color 0.2s;
}
.nav-back-circle-btn:hover {
  transform: scale(1.08);
  border-color: #FFF0A5;
}
.nav-back-circle-btn .arrow-icon {
  font-size: 20px;
  color: #FFD700;
}
.nav-back-circle-btn.hidden { display: none !important; }

.profile-widget { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, rgba(16, 25, 38, 0.95) 0%, rgba(16, 25, 38, 0.6) 100%); border: 2px solid rgba(212, 175, 55, 0.8); border-radius: 40px; padding: 4px 18px 4px 6px; box-shadow: 0 4px 15px rgba(0,0,0,0.8); cursor: pointer; }
.avatar-frame { width: 44px; height: 44px; background: #D4AF37; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #FFD700; overflow: hidden; }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-details { display: flex; flex-direction: column; }
.profile-header-line { display: flex; gap: 8px; align-items: center; }
.profile-name { font-weight: 800; font-size: 15px; color: #FFFFFF; text-shadow: 0 2px 4px rgba(0,0,0,0.9); }
.profile-sub { font-size: 12px; color: #FFD700; font-weight: bold; }
.xp-progress-bg { width: 110px; height: 8px; background: #0A111A; border-radius: 4px; border: 1px solid rgba(255,255,255,0.2); overflow: hidden; margin-top: 3px; position: relative; }
.xp-progress-fill { height: 100%; width: 65%; background: linear-gradient(90deg, #F39C12, #F1C40F); }

.resource-widgets-row { display: flex; align-items: center; gap: 12px; background: rgba(10, 16, 26, 0.9); border: 1.5px solid rgba(255, 215, 0, 0.4); padding: 6px 18px; border-radius: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.6); }
.res-chip { display: flex; align-items: center; gap: 6px; font-weight: bold; font-size: 14px; }
.res-val { color: #FFFFFF; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
.gems-chip { background: rgba(142, 68, 173, 0.3); border: 1px solid #8E44AD; padding: 3px 10px; border-radius: 20px; }
.btn-add-gems { background: #27AE60; color: #fff; border: 1px solid #2ECC71; width: 20px; height: 20px; border-radius: 4px; font-weight: bold; font-size: 14px; line-height: 18px; cursor: pointer; margin-left: 4px; }

#app-viewport { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; }

.game-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
}
.game-screen.active { display: flex; flex-direction: column; }

/* ── 1. MAIN MENU SCREEN ──────────────────────────────── */
#screen-main-menu {
  background: url('../images/main_bg_exact.jpg') no-repeat center center / cover;
  justify-content: space-between;
  padding: 80px 40px 40px 40px;
}

.main-left-panel {
  display: flex;
  flex-direction: column;
  width: 300px;
  gap: 12px;
  margin-top: auto;
  margin-bottom: auto;
  z-index: 5;
}

.brand-crest-box { text-align: center; margin-bottom: 8px; background: rgba(7, 10, 15, 0.4); padding: 10px; border-radius: 12px; backdrop-filter: blur(4px); }
.shield-crest { font-size: 48px; filter: drop-shadow(0 0 10px #FFD700); }
.brand-title { font-size: 36px; font-weight: 900; color: #FFD700; text-shadow: 0 4px 12px #000; letter-spacing: 2px; }
.brand-sub { font-size: 22px; font-weight: 800; color: #FFFFFF; text-shadow: 0 3px 8px #000; letter-spacing: 5px; margin-top: -6px; }

.btn-play-gold {
  background: var(--gold-button-bg);
  border: 2px solid var(--gold-button-border);
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 12px 0;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.8);
  width: 100%;
}

.btn-nav-blue {
  background: var(--blue-button-bg);
  border: 1px solid var(--blue-button-border);
  color: #E0EBF5;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 10px 0;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  width: 100%;
}

.btn-green-action { background: var(--green-button-bg); border: 1.5px solid var(--green-button-border); color: #FFF; font-size: 15px; font-weight: 800; padding: 10px 0; border-radius: 6px; cursor: pointer; text-align: center; width: 100%; }
.btn-gold-action { background: var(--gold-button-bg); border: 1.5px solid var(--gold-button-border); color: #FFF; font-size: 15px; font-weight: 800; padding: 10px 0; border-radius: 6px; cursor: pointer; text-align: center; flex: 1; }
.btn-blue-action { background: var(--blue-button-bg); border: 1.5px solid var(--blue-button-border); color: #FFF; font-size: 15px; font-weight: 800; padding: 10px 0; border-radius: 6px; cursor: pointer; text-align: center; flex: 1; }
.btn-red-disband { background: var(--red-button-bg); border: 1.5px solid #E74C3C; color: #FFF; font-size: 15px; font-weight: 800; padding: 10px 0; border-radius: 6px; cursor: pointer; text-align: center; flex: 1; }

.bottom-dock-bar { position: absolute; bottom: 16px; left: 0; width: 100vw; display: flex; justify-content: center; align-items: center; gap: 16px; z-index: 10; }
.dock-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 64px; background: linear-gradient(180deg, rgba(20, 30, 45, 0.95) 0%, rgba(10, 16, 24, 0.98) 100%); border: 1.5px solid rgba(212, 175, 55, 0.5); border-radius: 10px; color: #D4AF37; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }

/* ── 2. WORLD MAP SCREEN STYLES (RESTORED FULL CANVAS MAP) ──────────── */
#screen-world-map {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  padding: 0;
}

#interactive-world-map-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

.map-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/world_map_bg_exact.jpg') no-repeat center center / cover;
  filter: brightness(0.85);
}

#world-map-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.map-left-sidebar {
  position: absolute;
  top: 90px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.map-side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 56px;
  background: rgba(10, 16, 26, 0.9);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  border-radius: 8px;
  color: #FFD700;
  cursor: pointer;
}
.map-side-btn .m-icon { font-size: 18px; }
.map-side-btn .m-lbl { font-size: 10px; font-weight: bold; }

.command-log-card {
  position: absolute;
  bottom: 85px;
  left: 20px;
  width: 320px;
  background: rgba(10, 16, 26, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  border-radius: 10px;
  padding: 12px;
  color: #FFF;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.map-right-controls {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.map-zoom-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  border: 1.5px solid #FFD700;
  color: #FFD700;
  font-size: 20px;
  font-weight: 900;
  border-radius: 6px;
  cursor: pointer;
}

.map-bottom-hud {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.map-chip-box {
  background: rgba(10, 16, 26, 0.9);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  color: #FFD700;
}
.map-chip-box.chat-chip { cursor: pointer; }

.map-bottom-right-group { display: flex; align-items: center; gap: 12px; }
.map-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%);
  border: 2px solid #FFF0A5;
  font-size: 24px;
  cursor: pointer;
}
.map-dual-circle { display: flex; gap: 6px; }
.map-sm-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1C3D5A;
  border: 1.5px solid #FFD700;
  font-size: 18px;
  cursor: pointer;
}

/* ── 3. CITY HUB SCREEN STYLES ──────────────────────────────────────── */
#screen-castle-hub {
  position: relative;
  background: url('../images/city_castle_bg_exact.jpg') no-repeat center center / cover;
  padding: 85px 40px 30px 40px;
}

.city-hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.city-title-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 16, 26, 0.9);
  border: 1.5px solid #FFD700;
  padding: 8px 20px;
  border-radius: 30px;
}
.city-crest { font-size: 24px; }
.city-title-meta h2 { font-size: 16px; color: #FFD700; }
.city-title-meta p { font-size: 11px; color: #A0B2C6; }

.city-info-panel {
  position: absolute;
  left: 40px;
  top: 150px;
  width: 280px;
  background: rgba(10, 16, 26, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.city-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: auto;
  margin-bottom: auto;
  margin-left: 320px;
}
.city-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.btn-img-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #2C3C50 0%, #0F1620 100%);
  border: 2px solid #FFD700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}
.btn-label { margin-top: 6px; font-size: 13px; font-weight: 800; color: #FFF; text-shadow: 0 2px 4px #000; }

/* ── 4. KINGDOM ARMIES SCREEN STYLES (PREMIUM GOLD CARD) ─────────────── */
#screen-kingdom-armies { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.armies-main-card {
  width: 100%;
  max-width: 960px;
  height: 100%;
  background: rgba(10, 16, 26, 0.96);
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

.armies-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 12px;
}
.kingdom-meta-badge { display: flex; align-items: center; gap: 12px; }
.k-shield { font-size: 28px; }
.k-info h2 { font-size: 20px; color: #FFD700; font-weight: 800; }
.k-info p { font-size: 12px; color: #A0B2C6; font-weight: 600; }

.armies-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 8px;
}
.army-tab {
  background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  border: 1px solid #3A6A92;
  color: #A0B2C6;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.army-tab.active {
  background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%);
  border-color: #FFF0A5;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(255,215,0,0.4);
}

.armies-list-container {
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
}

.armies-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.armies-table th {
  background: rgba(16, 25, 38, 0.9);
  color: #FFD700;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
  position: sticky;
  top: 0;
}
.armies-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}

.armies-footer-actions {
  display: flex;
  gap: 16px;
}

/* ── 10. HEROES RPG SCREEN STYLES (PREMIUM GOLD CARD) ───────────────── */
#screen-heroes { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.heroes-main-card {
  width: 100%;
  max-width: 960px;
  height: 100%;
  background: rgba(10, 16, 26, 0.96);
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

.heroes-tabs-row {
  display: flex;
  gap: 8px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 8px;
}
.hero-tab {
  background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%);
  border: 1px solid #3A6A92;
  color: #A0B2C6;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.hero-tab.active {
  background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%);
  border-color: #FFF0A5;
  color: #FFFFFF;
}

.heroes-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  flex: 1;
  overflow-y: auto;
}

.hero-card {
  background: rgba(16, 25, 38, 0.8);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.hero-portrait {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #FFD700;
  overflow: hidden;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; }

.heroes-bottom-actions {
  display: flex;
  gap: 16px;
}

/* ── 13. MARKETSHOP SCREEN STYLES ───────────────────────────────── */
#screen-shop { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.shop-main-card {
  width: 100%;
  max-width: 960px;
  height: 100%;
  background: rgba(10, 16, 26, 0.96);
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.9);
}

.shop-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 12px;
}

.shop-title-box { display: flex; align-items: center; gap: 12px; }
.shop-badge-icon { font-size: 28px; }
.shop-title-box h2 { font-size: 20px; color: #FFD700; font-weight: 800; }
.shop-title-box p { font-size: 12px; color: #A0B2C6; font-weight: 600; }

.shop-balance-display { display: flex; gap: 12px; align-items: center; }
.b-chip { background: rgba(0,0,0,0.6); border: 1px solid #FFD700; border-radius: 20px; padding: 4px 14px; font-size: 14px; color: #FFF; }
.b-chip.gems { border-color: #8E44AD; background: rgba(142, 68, 173, 0.2); }

.shop-tabs-row { display: flex; gap: 8px; border-bottom: 1.5px solid rgba(212, 175, 55, 0.3); padding-bottom: 8px; }
.shop-tab { background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%); border: 1px solid #3A6A92; color: #A0B2C6; padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.shop-tab.active { background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%); border-color: #FFF0A5; color: #FFFFFF; box-shadow: 0 0 10px rgba(255,215,0,0.4); }

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.shop-item-card {
  background: rgba(16, 25, 38, 0.8);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s;
}
.shop-item-card:hover { transform: translateY(-4px); border-color: #FFD700; box-shadow: 0 4px 15px rgba(0,0,0,0.8); }

.item-icon-box {
  width: 56px;
  height: 56px;
  background: radial-gradient(circle, #2C3C50 0%, #0F1620 100%);
  border: 1.5px solid #FFD700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.item-name { font-size: 14px; font-weight: 800; color: #FFF; }
.item-desc { font-size: 11px; color: #A0B2C6; font-weight: bold; }

/* ── 23. LORD GEAR ARMORY GUI SCREEN STYLES ────────────────────────── */
#screen-gear { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }

.gear-main-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex: 1;
  width: 100%;
}

.gear-column { display: flex; flex-direction: column; gap: 16px; width: 260px; }

.gear-slot-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,0.5);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.gear-slot-box:hover { transform: scale(1.03); border-color: #FFD700; }
.gear-slot-box.active { border-color: #D4AF37; background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(10, 16, 26, 0.6) 100%); }
.gear-slot-box .g-icon { font-size: 28px; }
.gear-slot-box .g-meta { display: flex; flex-direction: column; }
.gear-slot-box .g-name { font-size: 13px; font-weight: 800; color: #FFF; }
.gear-slot-box .g-lvl { font-size: 11px; color: #FFD700; font-weight: bold; }

.gear-avatar-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}
.gear-hero-img {
  width: 220px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid #FFD700;
  box-shadow: 0 0 35px rgba(255,215,0,0.5);
}
.gear-power-badge {
  position: absolute;
  bottom: 10px;
  background: rgba(10, 16, 26, 0.95);
  border: 1.5px solid #FFD700;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 900;
  color: #FFD700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.gear-footer-row { display: flex; gap: 16px; width: 100%; }

/* ── SUBSCREEN GOLD CARDS ── */
#screen-mail, #screen-quests, #screen-ranking, #screen-events, #screen-inventory, #screen-castle-upgrade, #screen-research, #screen-workshop, #screen-hall {
  padding: 85px 40px 30px 40px;
  justify-content: center;
  align-items: center;
}
.subscreen-gold-card { width: 100%; max-width: 900px; height: 100%; background: rgba(10, 16, 26, 0.96); border: 2px solid rgba(212, 175, 55, 0.6); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.subscreen-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
.subscreen-header h2 { font-size: 20px; color: #FFD700; font-weight: 800; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 200; }
.modal-overlay.hidden { display: none; }
.modal-card { background: #121A26; border: 2px solid #D4AF37; border-radius: 12px; padding: 24px; width: 420px; max-height: 85vh; overflow-y: auto; text-align: center; color: #fff; box-shadow: 0 0 30px rgba(0,0,0,0.9); }

/* ── HERO CARD SELECTED STATE ── */
.hero-card-selected { border-color: #FFD700 !important; box-shadow: 0 0 20px rgba(255,215,0,0.5) !important; background: rgba(212,175,55,0.12) !important; }
.hero-card { cursor: pointer; transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s; }
.hero-card:hover { transform: translateY(-4px); border-color: #FFD700; }

/* ── COMMON SCREEN BACKGROUNDS ── */
#screen-kingdom-armies, #screen-heroes, #screen-shop, #screen-gear,
#screen-mail, #screen-quests, #screen-ranking, #screen-events, #screen-inventory,
#screen-castle-upgrade, #screen-research, #screen-workshop, #screen-hall {
  background: radial-gradient(ellipse at top, #0D1B2E 0%, #070A0F 100%);
}
#screen-encampment, #screen-training-ground, #screen-border, #screen-battle,
#screen-hospital, #screen-victory, #screen-defeat {
  background: radial-gradient(ellipse at top, #0D1B2E 0%, #070A0F 100%);
}

/* ── 5. ENCAMPMENT SCREEN ── */
#screen-encampment { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.encampment-card { width: 100%; max-width: 960px; height: 100%; background: rgba(10,16,26,0.96); border: 2px solid rgba(212,175,55,0.6); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.encampment-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
.enc-title-box { display: flex; align-items: center; gap: 12px; }
.e-badge { font-size: 28px; }
.badge-power { background: rgba(0,0,0,0.5); border: 1px solid #FFD700; padding: 4px 12px; border-radius: 20px; font-size: 13px; color: #FFD700; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.encampment-body-split { display: flex; gap: 20px; flex: 1; overflow: hidden; }
.enc-commander-panel { width: 240px; background: rgba(0,0,0,0.4); border: 1px solid rgba(212,175,55,0.3); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-large-avatar { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, #2C3C50, #0F1620); border: 2px solid #FFD700; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.cmd-info { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; width: 100%; }
.lbl-role { font-size: 11px; color: #A0B2C6; text-transform: uppercase; }
.lbl-lvl { font-size: 13px; color: #FFD700; font-weight: 800; }
.stat-line { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 12px; gap: 8px; }
.p-bar { flex: 1; height: 6px; background: #0A111A; border-radius: 3px; overflow: hidden; }
.p-fill { height: 100%; border-radius: 3px; }
.enc-troops-panel { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.enc-troop-row { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 10px 14px; }
.t-icon { font-size: 24px; width: 32px; text-align: center; }
.t-details { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.t-details .name { font-size: 13px; font-weight: 800; color: #FFF; }
.t-details .bar { height: 6px; background: #0A111A; border-radius: 3px; overflow: hidden; }
.t-details .fill { height: 100%; border-radius: 3px; }
.t-val { font-size: 14px; font-weight: 900; color: #FFD700; min-width: 55px; text-align: right; }
.enc-footer-buttons { display: flex; gap: 12px; }
.btn-secondary-gold { background: rgba(229,169,59,0.2); border: 1px solid #FFD700; color: #FFD700; font-size: 13px; font-weight: 800; padding: 8px 0; border-radius: 6px; cursor: pointer; width: 100%; }

/* ── 6. TRAINING GROUND SCREEN ── */
#screen-training-ground { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.training-main-card { width: 100%; max-width: 960px; height: 100%; background: rgba(10,16,26,0.96); border: 2px solid rgba(212,175,55,0.6); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.training-tabs-row { display: flex; gap: 8px; border-bottom: 1.5px solid rgba(212,175,55,0.3); padding-bottom: 8px; }
.train-tab { background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%); border: 1px solid #3A6A92; color: #A0B2C6; padding: 8px 18px; border-radius: 6px; font-size: 13px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.train-tab.active { background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%); border-color: #FFF0A5; color: #FFF; box-shadow: 0 0 10px rgba(255,215,0,0.4); }
.training-rows-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.train-row { display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 12px 16px; }
.t-avatar { font-size: 32px; width: 44px; text-align: center; }
.t-meta { flex: 1; }
.t-meta h4 { font-size: 15px; font-weight: 800; color: #FFF; margin-bottom: 4px; }
.cost-row { display: flex; gap: 12px; font-size: 12px; color: #FFD700; font-weight: bold; }
.training-queue-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.queue-info { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #A0B2C6; }

/* ── 7. BORDER WARZONE SCREEN ── */
#screen-border { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.border-exact-card { width: 100%; max-width: 960px; height: 100%; background: rgba(10,16,26,0.96); border: 2px solid rgba(212,175,55,0.6); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.border-header-strip { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
.border-header-strip h2 { font-size: 18px; color: #FFD700; font-weight: 800; }
.border-body-content { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.border-scout-panel { background: rgba(0,0,0,0.4); border: 1px solid rgba(231,76,60,0.4); border-radius: 10px; padding: 16px; }
.scout-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.e-icon { font-size: 32px; }
.scout-power { font-size: 13px; color: #FFD700; font-weight: bold; }
.scout-troops-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.scout-unit-chip { background: rgba(10,16,26,0.8); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.u-icon { font-size: 20px; }
.u-name { font-size: 11px; color: #A0B2C6; font-weight: bold; }
.u-count { font-size: 14px; color: #FFF; font-weight: 900; }
.border-actions-toolbar { display: flex; gap: 12px; }
.btn-action-scout { flex: 1; background: linear-gradient(180deg, #1C3D5A 0%, #0F2538 100%); border: 1.5px solid #3A6A92; color: #FFF; font-size: 15px; font-weight: 800; padding: 12px 0; border-radius: 8px; cursor: pointer; }
.btn-action-attack { flex: 2; background: linear-gradient(180deg, #C0392B 0%, #7B241C 100%); border: 1.5px solid #E74C3C; color: #FFF; font-size: 18px; font-weight: 900; padding: 12px 0; border-radius: 8px; cursor: pointer; letter-spacing: 2px; }
.btn-action-rally { flex: 1; background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%); border: 1.5px solid #FFF0A5; color: #FFF; font-size: 15px; font-weight: 800; padding: 12px 0; border-radius: 8px; cursor: pointer; }
.border-march-meta { display: flex; gap: 20px; font-size: 13px; color: #A0B2C6; font-weight: bold; }
.border-march-meta strong { color: #FFD700; }

/* ── 8. BATTLE PVP SCREEN ── */
#screen-battle { padding: 85px 20px 20px 20px; justify-content: space-between; }
.pvp-vs-header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.side-player, .side-enemy { display: flex; align-items: center; gap: 10px; }
.flag-icon { font-size: 36px; }
.flag-icon.red { color: #E74C3C; }
.p-info { display: flex; flex-direction: column; }
.p-info .name { font-size: 16px; font-weight: 800; color: #FFF; }
.p-info .power { font-size: 13px; color: #FFD700; font-weight: bold; }
.vs-badge-gold { width: 60px; height: 60px; background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%); border: 2px solid #FFF0A5; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: #FFF; box-shadow: 0 0 20px rgba(255,215,0,0.6); }
.battle-pvp-stage { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 0 60px; gap: 20px; }
.player-stack-column, .enemy-stack-column { display: flex; flex-direction: column; gap: 8px; }
.stack-card { background: rgba(10,16,26,0.8); border: 1px solid rgba(46,204,113,0.4); border-radius: 8px; padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 800; color: #FFF; min-width: 140px; }
.hp-bar { height: 6px; background: #0A111A; border-radius: 3px; overflow: hidden; }
.hp-fill { height: 100%; background: linear-gradient(90deg, #2ECC71, #27AE60); border-radius: 3px; width: 100%; }
.hp-bar.enemy .hp-fill.enemy { background: linear-gradient(90deg, #E74C3C, #C0392B); }
.pvp-bottom-actions { display: flex; justify-content: center; align-items: center; gap: 16px; padding-bottom: 10px; }

/* ── 9. HOSPITAL SCREEN ── */
#screen-hospital { padding: 85px 40px 30px 40px; justify-content: center; align-items: center; }
.hospital-exact-card { width: 100%; max-width: 960px; height: 100%; background: rgba(10,16,26,0.96); border: 2px solid rgba(212,175,55,0.6); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.hosp-banner-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 12px; }
.hosp-banner-header h2 { font-size: 18px; color: #FFD700; font-weight: 800; }
.hosp-wounded-chip { background: rgba(231,76,60,0.2); border: 1px solid #E74C3C; color: #E74C3C; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 800; }
.hosp-list-rows { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.hosp-troop-item { display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 12px 16px; }
.troop-portrait-box { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 2px solid #FFD700; flex-shrink: 0; }
.hosp-portrait-img { width: 100%; height: 100%; object-fit: cover; }
.troop-info-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.t-name { font-size: 15px; font-weight: 800; color: #FFF; }
.t-hp-bar-bg { height: 6px; background: #0A111A; border-radius: 3px; overflow: hidden; }
.t-hp-bar-fill { height: 100%; background: linear-gradient(90deg, #E74C3C, #C0392B); border-radius: 3px; }
.t-cost-row { display: flex; gap: 12px; }
.cost-item { font-size: 12px; color: #A0B2C6; font-weight: bold; }
.cost-item.timer { color: #F39C12; }
.troop-action-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hosp-badge-shield { font-size: 24px; }
.btn-heal-green { background: linear-gradient(180deg, #538A2A 0%, #3B671B 100%); border: 1.5px solid #7BBD42; color: #FFF; font-size: 13px; font-weight: 800; padding: 6px 16px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.b-lbl { font-size: 14px; }
.b-cost { font-size: 11px; color: #7BBD42; }
.hosp-footer-bar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; }
.hosp-upgrade-info { display: flex; flex-direction: column; gap: 2px; }
.speed-boost-txt { font-size: 14px; font-weight: 800; color: #2ECC71; }
.sub-txt { font-size: 12px; color: #A0B2C6; }
.btn-upgrade-hospital { background: linear-gradient(180deg, #E5A93B 0%, #A66E14 100%); border: 1.5px solid #FFF0A5; color: #FFF; font-size: 14px; font-weight: 800; padding: 8px 24px; border-radius: 6px; cursor: pointer; }

/* ── 11-12. VICTORY / DEFEAT SCREENS ── */
#screen-victory, #screen-defeat { justify-content: center; align-items: center; }
#screen-victory { background: radial-gradient(ellipse at top, #1A2E0A 0%, #070A0F 100%); }
#screen-defeat { background: radial-gradient(ellipse at top, #2E0A0A 0%, #070A0F 100%); }
.result-scene-card { width: 100%; max-width: 560px; background: rgba(10,16,26,0.96); border: 2px solid rgba(212,175,55,0.6); border-radius: 16px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; box-shadow: 0 10px 50px rgba(0,0,0,0.9); }
.victory-theme { border-color: rgba(46,204,113,0.6); }
.defeat-theme { border-color: rgba(231,76,60,0.6); }
.result-banner-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.result-crown { font-size: 52px; animation: pulse-glow 1.5s ease-in-out infinite; }
@keyframes pulse-glow { 0%, 100% { filter: drop-shadow(0 0 8px #FFD700); } 50% { filter: drop-shadow(0 0 20px #FFD700); } }
.result-title { font-size: 42px; font-weight: 900; letter-spacing: 4px; }
.result-sub { font-size: 14px; color: #A0B2C6; }
.rewards-display-box { width: 100%; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 16px; }
.rewards-display-box h4 { font-size: 14px; color: #FFD700; margin-bottom: 10px; }
.rewards-grid-row { display: flex; gap: 12px; flex-wrap: wrap; }
.reward-chip { background: rgba(10,16,26,0.8); border: 1px solid rgba(212,175,55,0.4); border-radius: 8px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; min-width: 80px; }
.r-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; }
.r-icon.gold { background: rgba(229,169,59,0.2); border: 1px solid #E5A93B; color: #FFD700; }
.r-icon.xp { background: rgba(46,204,113,0.2); border: 1px solid #2ECC71; color: #2ECC71; font-size: 12px; }
.r-icon.points { background: rgba(58,134,239,0.2); border: 1px solid #3A86EF; color: #3A86EF; }
.r-icon.hero { background: rgba(231,76,60,0.2); border: 1px solid #E74C3C; color: #E74C3C; }
.r-val { font-size: 16px; font-weight: 900; color: #FFF; }
.r-lbl { font-size: 11px; color: #A0B2C6; }
.result-actions-row { display: flex; gap: 12px; width: 100%; }

/* ── 18. INVENTORY SCREEN ── */
.inventory-items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; overflow-y: auto; flex: 1; }
.inventory-item-card { background: rgba(16,25,38,0.8); border: 1.5px solid rgba(212,175,55,0.4); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; transition: transform 0.2s, border-color 0.2s; }
.inventory-item-card:hover { transform: translateY(-4px); border-color: #FFD700; }
.btn-inv-action { font-size: 12px !important; padding: 6px 0 !important; width: 100%; margin-top: auto; }

/* ── COMMON UTILITY CLASSES ── */
.text-gold { color: #FFD700 !important; }
.text-danger { color: #E74C3C !important; }
.text-green { color: #2ECC71 !important; }
.badge-status { font-size: 13px; font-weight: 800; }
.badge-lvl { background: linear-gradient(90deg, #E5A93B, #A66E14); color: #FFF; font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 900; margin-left: 4px; }
.city-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.city-info-row .lbl { color: #A0B2C6; }
.city-info-row .val { font-weight: 800; color: #FFF; }
.progress-bar-wrap { position: relative; width: 120px; height: 8px; background: #0A111A; border-radius: 4px; overflow: hidden; border: 1px solid rgba(255,255,255,0.15); }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #2ECC71, #27AE60); border-radius: 4px; }
.p-text { position: absolute; right: 4px; top: -1px; font-size: 9px; color: #FFF; font-weight: 900; }
.subscreen-body-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.list-item-row { display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; padding: 12px 16px; }
.item-icon { font-size: 28px; }
.item-meta { flex: 1; }
.item-meta h4 { font-size: 14px; font-weight: 800; color: #FFF; margin-bottom: 2px; }
.item-meta p { font-size: 12px; color: #A0B2C6; }
.item-time { font-size: 11px; color: #A0B2C6; font-weight: bold; white-space: nowrap; }
.dock-icon { font-size: 22px; }
.dock-lbl { font-size: 11px; font-weight: 800; }

/* ── GLOBAL MOBILE RESPONSIVE MEDIA QUERIES ───────────────────────── */
@media (max-width: 768px) {
  /* Top HUD */
  .top-hud-bar { padding: 8px 10px; height: 60px; }
  .profile-name { display: none; }
  .res-bar-group { gap: 6px; }
  .res-chip { padding: 4px 6px; font-size: 11px; }

  /* Screens Padding */
  .game-screen { padding: 70px 12px 15px 12px !important; }

  /* Cards & Containers */
  .training-main-card, .border-exact-card, .hospital-exact-card, .shop-exact-card, .gear-armory-card {
    padding: 14px !important;
    gap: 10px !important;
  }

  /* Modals */
  .kaw-modal-box, .modal-card { width: 95vw !important; max-width: 95vw !important; padding: 16px !important; }

  /* Main Menu Grid */
  .menu-grid-container { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
}

@media (max-width: 480px) {
  .splash-title { font-size: 28px !important; }
  .splash-presenter { font-size: 12px !important; letter-spacing: 3px !important; }
}

/* ── MOBILE LANDSCAPE & SHORT SCREEN GUI RESPONSIVE FIT ── */
@media (max-height: 550px), (max-width: 960px) and (orientation: landscape) {
  /* Top HUD Bar */
  .top-hud-bar {
    height: 46px !important;
    padding: 3px 12px !important;
    background: rgba(7, 10, 15, 0.95) !important;
  }
  .profile-widget {
    padding: 2px 10px 2px 4px !important;
    gap: 6px !important;
  }
  .avatar-frame {
    width: 30px !important;
    height: 30px !important;
  }
  .profile-name { font-size: 12px !important; }
  .profile-sub { font-size: 10px !important; }
  .xp-progress-bg { display: none !important; }

  .resource-widgets-row {
    padding: 3px 10px !important;
    gap: 6px !important;
    border-radius: 20px !important;
    max-width: calc(100vw - 180px);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .res-chip {
    font-size: 11px !important;
    padding: 2px 4px !important;
    white-space: nowrap;
  }
  .platform-toggle-btn {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }

  /* Main Menu Screen & Left Panel */
  #screen-main-menu {
    padding: 48px 16px 8px 16px !important;
  }

  .main-left-panel {
    width: 220px !important;
    gap: 3px !important;
    max-height: calc(100dvh - 55px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    padding-bottom: 55px !important;
    margin-top: 0 !important;
  }

  .brand-crest-box {
    padding: 3px !important;
    margin-bottom: 2px !important;
  }
  .shield-crest { font-size: 22px !important; }
  .brand-title { font-size: 18px !important; letter-spacing: 1px !important; }
  .brand-sub { font-size: 11px !important; margin-top: -3px !important; letter-spacing: 3px !important; }

  .btn-play-gold {
    font-size: 15px !important;
    padding: 5px 0 !important;
  }
  .btn-nav-blue {
    font-size: 11px !important;
    padding: 4px 0 !important;
  }

  /* Bottom Dock Bar */
  .bottom-dock-bar {
    bottom: 4px !important;
    gap: 8px !important;
  }
  .dock-btn {
    width: 46px !important;
    height: 40px !important;
    border-radius: 6px !important;
  }
  .dock-icon { font-size: 15px !important; }
  .dock-lbl { font-size: 8px !important; }

  /* Subscreens Padding */
  .game-screen {
    padding: 48px 10px 10px 10px !important;
  }

  /* Modals on short landscape screen */
  .modal-card {
    max-height: 90dvh !important;
    overflow-y: auto !important;
    padding: 12px !important;
  }
}
