/* ============================================================
   AEXOR Legends — Main Styles (Landscape Mode)
   ============================================================ */

/* ── CSS Variables ── */
:root {
  --tg-bg: #0a0e1a;
  --tg-text: #e8e8e8;
  --tg-hint: #8899aa;
  --tg-btn: #6c5ce7;
  --tg-btn-text: #ffffff;
  --tg-secondary-bg: #141825;

  --card-common: #6b7280;
  --card-rare: #3b82f6;
  --card-epic: #a855f7;
  --card-legendary: #f59e0b;

  --type-fire: #ef4444;
  --type-water: #3b82f6;
  --type-nature: #22c55e;
  --type-thunder: #eab308;
  --type-shadow: #8b5cf6;
  --type-light: #fbbf24;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);

  --header-h: 36px;
  --nav-h: 40px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #0a0e1a !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e8e8e8;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

h1, h2, h3 { font-weight: 700; }
a { color: var(--tg-btn); text-decoration: none; }

/* ── Landscape Wrapper (forces landscape via CSS rotation) ── */
/* After rotation + phone tilt: our LEFT = physical TOP (Telegram header).
   We add padding-left to create safe zone away from TG controls. */
#app-root {
  position: fixed;
  top: 0;
  left: 100vw;
  width: 100vh;
  height: 100vw;
  transform: rotate(90deg);
  transform-origin: top left;
  overflow: hidden;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 4px 6px 4px 92px;
}

/* Inner content frame */
#app-root::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 90px;
  right: 4px;
  bottom: 2px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  pointer-events: none;
  z-index: 0;
  background: var(--tg-bg);
}

/* ── Screens ── */
.screen {
  display: none;
  padding: 8px 12px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--tg-bg);
  animation: fadeIn 0.2s ease;
  position: relative;
  z-index: 1;
  border-radius: 12px;
}
.screen.active { display: flex; flex-direction: column; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Header (compact landscape) ── */
.app-header {
  flex-shrink: 0;
  height: var(--header-h);
  z-index: 100;
  position: relative;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1e35 100%);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-logo {
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #6c5ce7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.header-crystals {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(108,92,231,0.15);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
}

/* ── Bottom Navigation (compact landscape) ── */
.bottom-nav {
  flex-shrink: 0;
  height: var(--nav-h);
  background: var(--tg-secondary-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  position: relative;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--tg-hint);
  font-size: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-btn .nav-icon { font-size: 18px; }
.nav-btn.active { color: var(--tg-btn); }
.nav-btn:active { transform: scale(0.95); }

/* ── Buttons ── */
.axl-btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.axl-btn:active { transform: scale(0.97); }
.axl-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.axl-btn-primary { background: var(--tg-btn); color: var(--tg-btn-text); }
.axl-btn-primary:hover:not(:disabled) { filter: brightness(1.1); }

.axl-btn-secondary { background: rgba(255,255,255,0.1); color: var(--tg-text); }
.axl-btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.15); }

.axl-btn-lg { padding: 12px 24px; font-size: 14px; width: 100%; border-radius: var(--radius); }
.axl-btn-sm { padding: 5px 10px; font-size: 11px; }
.axl-btn-close { background: rgba(255,255,255,0.08); color: var(--tg-hint); width: 100%; margin-top: 8px; }

/* ── Selects ── */
.axl-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--tg-text);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* ── Toast ── */
.axl-toast {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(20,24,37,0.95);
  border: 1px solid rgba(108,92,231,0.3);
  color: var(--tg-text);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 12px;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
  white-space: nowrap;
}

.axl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Overlay & Modal ── */
.axl-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.axl-overlay.open { opacity: 1; pointer-events: auto; }

.axl-modal {
  background: var(--tg-secondary-bg);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
  max-width: 400px;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.axl-modal h3 { margin-bottom: 6px; font-size: 15px; }
.axl-modal p { color: var(--tg-hint); font-size: 12px; margin-bottom: 12px; }
.axl-modal-btns { display: flex; gap: 8px; }
.axl-modal-btns .axl-btn { flex: 1; }

/* ── Loading ── */
.axl-loading-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10,14,26,0.9);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.axl-loading-content { text-align: center; }
.axl-loading-content p { margin-top: 8px; color: var(--tg-hint); font-size: 13px; }

.axl-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(108,92,231,0.2);
  border-top-color: var(--tg-btn);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 20px 16px; color: var(--tg-hint); }
.hint { color: var(--tg-hint); font-size: 12px; text-align: center; padding: 6px; }
.loading-text { color: var(--tg-hint); text-align: center; padding: 16px; font-size: 13px; }

/* ── Hidden utility ── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   HOME SCREEN — Lust Goddess Full-Screen Layout
   ══════════════════════════════════════════════════════════════ */

/* Hide generic header/nav when home is active */
#app-root.home-active .app-header { display: none; }
#app-root.home-active .bottom-nav { display: none; }
#app-root.home-active #sc-home { padding: 0; }

/* Home screen fills everything */
#sc-home #home-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
  background: url('../IMG/home-bg.png') center center / cover no-repeat, #0a0e1a;
}

/* ── Top Bar (avatar + currencies) ── */
.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  z-index: 10;
  flex-shrink: 0;
}

.home-player-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--tg-btn);
  background: rgba(108,92,231,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.home-avatar-emoji { font-size: 20px; }
.home-avatar img { width: 100%; height: 100%; object-fit: cover; }

.home-player-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.home-player-level {
  font-size: 10px;
  color: var(--tg-btn);
  font-weight: 600;
}

.home-currencies {
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-currency {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 3px 4px 3px 8px;
  font-size: 11px;
  font-weight: 600;
}

.hc-icon { font-size: 14px; }
.hc-amount { color: #fff; min-width: 24px; }

.hc-add {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #22c55e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.home-settings-btn {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Main Area (sidebars + center) ── */
.home-main {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
  padding: 0 4px;
}

/* ── Side Buttons (left & right) — Mini cards with thumbnails ── */
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
  justify-content: center;
  width: 62px;
  flex-shrink: 0;
}

.home-side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 4px 4px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s;
  backdrop-filter: blur(4px);
}

.home-side-btn:active { transform: scale(0.93); }

/* Thumbnail area — circular, holds emoji or future image */
.hsb-thumb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.hsb-thumb-emoji { font-size: 18px; line-height: 1; }

/* When image is added later: */
.hsb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hsb-label { font-size: 8px; font-weight: 700; color: #ddd; white-space: nowrap; letter-spacing: 0.3px; }
.hsb-sub { font-size: 7px; color: var(--tg-hint); font-weight: 600; }

/* Notification dot */
.hsb-notif {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #0a0e1a;
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Theme-colored thumbnails */
.hsb-purple .hsb-thumb { background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(108,92,231,0.2)); border-color: rgba(168,85,247,0.4); }
.hsb-blue .hsb-thumb { background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(59,130,246,0.2)); border-color: rgba(59,130,246,0.4); }
.hsb-red .hsb-thumb { background: linear-gradient(135deg, rgba(239,68,68,0.3), rgba(239,68,68,0.2)); border-color: rgba(239,68,68,0.4); }
.hsb-teal .hsb-thumb { background: linear-gradient(135deg, rgba(20,184,166,0.3), rgba(20,184,166,0.2)); border-color: rgba(20,184,166,0.4); }
.hsb-pink .hsb-thumb { background: linear-gradient(135deg, rgba(236,72,153,0.3), rgba(236,72,153,0.2)); border-color: rgba(236,72,153,0.4); }
.hsb-gold .hsb-thumb { background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(245,158,11,0.2)); border-color: rgba(245,158,11,0.4); }
.hsb-green .hsb-thumb { background: linear-gradient(135deg, rgba(34,197,94,0.3), rgba(34,197,94,0.2)); border-color: rgba(34,197,94,0.4); }
.hsb-orange .hsb-thumb { background: linear-gradient(135deg, rgba(249,115,22,0.3), rgba(249,115,22,0.2)); border-color: rgba(249,115,22,0.4); }

/* ── Center: Featured Card/Character ── */
.home-center {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  min-width: 0;
}

.home-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: 100%;
  justify-content: flex-end;
}

.home-char-img {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  height: 140%;
  width: auto;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(34,197,94,0.3)) drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  animation: charFloat 3s ease-in-out infinite;
}

@keyframes charFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

.home-char-info {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-bottom: 4px;
}

.home-char-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.home-char-rarity {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-block;
  margin-top: 2px;
}

.home-char-rarity.rarity-common { background: rgba(107,114,128,0.3); color: var(--card-common); }
.home-char-rarity.rarity-rare { background: rgba(59,130,246,0.3); color: var(--card-rare); }
.home-char-rarity.rarity-epic { background: rgba(168,85,247,0.3); color: var(--card-epic); }
.home-char-rarity.rarity-legendary {
  background: rgba(245,158,11,0.3);
  color: var(--card-legendary);
  animation: legendaryPulse 2s ease-in-out infinite;
}

@keyframes legendaryPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,0.3); }
  50% { box-shadow: 0 0 20px rgba(245,158,11,0.6); }
}

.home-char-stats {
  display: flex;
  gap: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #ccc;
  margin-top: 3px;
}

/* ── Bottom Bar ── */
.home-bottombar {
  display: flex;
  align-items: center;
  padding: 4px 6px 6px;
  gap: 6px;
  z-index: 10;
  flex-shrink: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.4), transparent);
}

/* Shop button (bottom-left) */
.home-shop-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.home-shop-btn:active { transform: scale(0.93); }
.home-shop-icon { font-size: 18px; }
.home-shop-label { font-size: 8px; font-weight: 600; color: #ccc; }

/* Bottom nav (center) */
.home-bottom-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.home-bnav-btn {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 5px 10px;
  color: #bbb;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.home-bnav-btn:active { transform: scale(0.95); background: rgba(255,255,255,0.06); }
.home-bnav-icon { font-size: 14px; }

/* BATTLE button (bottom-right) — prominent orange */
.home-battle-btn {
  background: linear-gradient(135deg, #f97316, #ef4444);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 8px 18px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 0 20px rgba(249,115,22,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.15s;
  animation: battleBtnPulse 2s ease-in-out infinite;
}

.home-battle-btn:active { transform: scale(0.95); }

.home-battle-icon { font-size: 16px; }

.home-battle-text {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@keyframes battleBtnPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(249,115,22,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
  50% { box-shadow: 0 0 30px rgba(249,115,22,0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
}
