/* ==========================================================================
   MAFIA MOB - Dark Syndicate Theme
   Palette: Rich Obsidian (#0a0b0e), Charcoal (#13151b), Gold (#d4af37, #f3e5ab),
            Blood Crimson (#b22222, #e63946), Emerald Cash (#22c55e)
   Typography: Cinzel (Display/Headings) & Inter (UI/Body)
   ========================================================================== */

:root {
  --bg-dark: #090a0d;
  --bg-card: #12141a;
  --bg-card-hover: #181b24;
  --bg-input: #0d0f14;
  --bg-overlay: rgba(9, 10, 13, 0.85);

  --border-subtle: #20242f;
  --border-gold: rgba(212, 175, 55, 0.35);
  --border-gold-bright: #d4af37;

  --gold-primary: #d4af37;
  --gold-light: #f5e298;
  --gold-dim: #997d26;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --crimson: #e63946;
  --crimson-dark: #801823;
  --crimson-glow: rgba(230, 57, 70, 0.25);

  --emerald: #22c55e;
  --emerald-dark: #15803d;
  --emerald-glow: rgba(34, 197, 94, 0.25);

  --cyan: #06b6d4;
  --purple: #a855f7;

  --text-main: #f1f3f7;
  --text-muted: #8b92a4;
  --text-gold: #d4af37;

  --font-display: 'Cinzel', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 15px rgba(212, 175, 55, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Vignette Background */
.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 65%),
              radial-gradient(circle at 50% 100%, rgba(13, 15, 20, 0.9) 0%, rgba(5, 5, 8, 0.98) 100%);
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

a {
  color: var(--gold-primary);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--gold-light);
  text-shadow: 0 0 8px var(--gold-glow);
}

/* Container */
.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  flex: 1;
}

/* Top Navigation Bar */
.topbar {
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  background: linear-gradient(135deg, #aa820a, #f3e5ab);
  color: #0b0c10;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-light);
  box-shadow: var(--shadow-gold);
  letter-spacing: 0.05em;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.brand-text span {
  color: var(--gold-primary);
  text-shadow: 0 0 10px var(--gold-glow);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

.nav-user {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
}

/* Flash Messages */
.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
}

.flash-info {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #a5f3fc;
}

.flash-warn {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.flash-error {
  background: rgba(230, 57, 70, 0.12);
  border-color: rgba(230, 57, 70, 0.35);
  color: #fca5a5;
}

.flash-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.card-gold {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, #161821 0%, #101218 100%);
}

.card-gold::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.card-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary, .btn-gold {
  background: linear-gradient(135deg, #aa820a 0%, #d4af37 50%, #f3e5ab 100%);
  color: #0b0c10;
  border-color: var(--gold-light);
  box-shadow: 0 2px 8px var(--gold-glow);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  font-weight: 800;
}

.btn-primary:hover, .btn-gold:hover {
  background: linear-gradient(135deg, #be9515 0%, #e2be4c 50%, #fff0b8 100%);
  color: #000;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1c1f28;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: #252936;
  border-color: var(--text-muted);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, var(--crimson-dark), var(--crimson));
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 2px 8px var(--crimson-glow);
}

.btn-danger:hover {
  box-shadow: 0 0 14px rgba(230, 57, 70, 0.45);
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-mini {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  background: var(--gold-primary);
  color: #0b0c10;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.btn-mini:hover {
  background: var(--gold-light);
  color: #000;
  box-shadow: var(--shadow-gold);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.form-control, input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, input:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Auth Pages (Register / Login / Verify) */
.auth-wrap {
  max-width: 440px;
  margin: 3rem auto;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(212, 175, 55, 0.1);
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.auth-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Player Dashboard Stats Grid */
.player-banner {
  background: linear-gradient(135deg, #171922 0%, #101218 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.player-main-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: #202430;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  box-shadow: var(--shadow-gold);
}

.player-names h2 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
  color: #fff;
}

.player-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-rank {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.badge-clan {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

/* Stat Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.3);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-val {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-ui);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stat-val-energy { color: var(--cyan); }
.stat-val-health { color: var(--crimson); }
.stat-val-cash { color: var(--emerald); }
.stat-val-respect { color: var(--gold-light); }

/* Progress Bars */
.progress-container {
  margin-top: 0.5rem;
  width: 100%;
  height: 8px;
  background: #1e222d;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-energy { background: linear-gradient(90deg, #0891b2, #06b6d4); }
.progress-health { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.progress-exp { background: linear-gradient(90deg, #aa820a, #d4af37); }

/* Action Grid */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.action-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.action-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Footer */
.foot {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(9, 10, 13, 0.95);
}

/* Responsiveness */
@media (max-width: 768px) {
  .topbar {
    padding: 0.75rem 1rem;
  }
  .brand-text {
    font-size: 1.05rem;
  }
  .player-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 1.5rem 1rem;
  }
}


/* ==========================================================================
   MAFIA MOB - VISUAL UPGRADES (Assets & Illustrations)
   ========================================================================== */

.auth-wrap {
  max-width: 960px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.hero-landing {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-logo-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.45));
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  letter-spacing: 3px;
  margin: 0.25rem 0;
  text-transform: uppercase;
}

.hero-tagline {
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.hero-desc {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Item Card Visual Media (Market & Armory) */
.item-card-media {
  background: radial-gradient(circle at 50% 50%, rgba(30, 36, 48, 0.6) 0%, rgba(9, 11, 16, 0.95) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: -1.25rem -1.25rem 1rem -1.25rem;
  padding: 1.25rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.item-card-media img {
  max-width: 100%;
  height: 110px;
  object-fit: contain;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.card:hover .item-card-media img {
  transform: scale(1.06);
}

/* Clan Crest Media Header */
.clan-card-media {
  background: radial-gradient(circle at 50% 40%, rgba(20, 25, 35, 0.7) 0%, rgba(8, 10, 15, 0.98) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: -1.25rem -1.25rem 1rem -1.25rem;
  padding: 1.5rem 0.5rem;
  text-align: center;
  border-bottom: 2px solid var(--border-gold);
}

.clan-card-media img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.9));
  transition: transform 0.3s ease;
}

.card:hover .clan-card-media img {
  transform: translateY(-4px) scale(1.05);
}

/* Combat Target NPC Portrait */
.npc-portrait-wrap {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border-gold);
  background: #0b0e14;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.npc-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Player HQ Avatar Frame */
.player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  background: #0b0e14;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  flex-shrink: 0;
}

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


/* UI SVG Icons & Subnav */
.subnav-icon {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  margin-right: 7px;
  display: inline-block;
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.subnav-item:hover .subnav-icon,
.subnav-item.active .subnav-icon {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(250,204,21,0.7));
  transform: scale(1.1);
}

.nav-ui-icon {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-right: 5px;
  display: inline-block;
  opacity: 1;
}

/* Ensure action-card headers show large crisp icons */
.action-card h3 .subnav-icon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -4px;
  filter: drop-shadow(0 0 6px rgba(250,204,21,0.5));
}

.energy-countdown-badge {
  font-size: 0.72rem;
  color: #93c5fd;
  margin-left: 6px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.18);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  letter-spacing: 0.3px;
}

/* Crime Card Media */
.crime-card-media {
  width: 100%;
  max-width: 320px;
  height: 120px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #080a0f;
  border: 1px solid var(--border-subtle);
}
.crime-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .crime-card-media img {
  transform: scale(1.04);
}
