/* ==============================================================
   PIRATES MINI APP - HIGH-END THEME DESIGN SYSTEM
   Aesthetic: Ancient Pirate Galleon, Carved Rune Stone & Gold
   ============================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&family=Outfit:wght@400;500;600;700;800&family=Cairo:wght@600;700;800&display=swap');

:root {
  --bg-dark: #0d0907;
  --bg-card: rgba(28, 20, 16, 0.88);
  --bg-card-border: rgba(212, 175, 55, 0.35);
  
  /* Ancient Carved Stone Button Colors (Inspired by reference) */
  --stone-face: #ded9cf;
  --stone-top: #f4f0e6;
  --stone-shadow: #8f8779;
  --stone-dark: #5c5549;
  --stone-text: #2c251e;
  
  /* Gold & Gems */
  --gold-primary: #ffd700;
  --gold-light: #fff2a3;
  --gold-dark: #aa820a;
  --ruby-primary: #ff2a2a;
  --ruby-glow: rgba(255, 42, 42, 0.6);

  /* Fonts */
  --font-pirate: 'Cinzel', serif;
  --font-body: 'Outfit', 'Cairo', sans-serif;

  --nav-height: 54px;
  --bottom-bar-height: 55px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
}

img {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  pointer-events: none !important;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: #f1ebd9;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Low-end hardware GPU rendering acceleration */
.app-viewport,
.active-pirate-card,
.stat-card-item,
.flymage-modal-card,
.banned-card,
.stone-btn {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Background Atmosphere Layer (Isolated & Modular for user replacement) */
.bg-atmosphere {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/backgrounds/custom_bg.png'), url('../assets/backgrounds/custom_bg.jpg'), url('../assets/backgrounds/pirate_bg.svg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: -2;
  filter: brightness(0.65) contrast(1.1);
}

.bg-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: -1;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  padding: 10px 12px 55px 12px;
  position: relative;
}

/* ==============================================================
   CARVED CHISELED STONE BUTTONS & BADGES (Authentic Rock Tablets)
   ============================================================== */
.stone-badge {
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  color: #1f1811;
  font-weight: 800;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  position: relative;
  padding: 8px 14px;
}

.stone-btn {
  background: url('../assets/icons/stone_btn.png') no-repeat center center / 100% 100%;
  color: #1a130c;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.88rem;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.65));
  cursor: pointer;
  padding: 10px 14px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: transform 0.08s ease, filter 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.stone-btn:active {
  transform: translateY(2.5px) scale(0.98);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.stone-btn.active {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.95)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.65)) brightness(1.1);
  color: #0b0704;
}

/* ==============================================================
   TOP HEADER SECTION
   ============================================================== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.balance-card {
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65));
  padding: 6px 14px 6px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  flex: 1;
  min-width: 0;
}

.balance-label-val {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.balance-title {
  font-size: 0.66rem;
  color: #5c5244;
  text-transform: capitalize;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-number {
  font-size: clamp(0.92rem, 3.4vw, 1.08rem);
  font-weight: 900;
  color: #1a140e;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-card .icon-gold {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-gold, .icon-gem {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5));
  animation: shimmerGold 3s infinite ease-in-out;
  vertical-align: middle;
}

@keyframes shimmerGold {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.5)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(255, 223, 70, 0.85)); }
}

/* Profile snippet on right */
.profile-snippet {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  background: #1c140e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

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

.avatar-placeholder {
  font-size: 1.1rem;
}

#headerProfileBtn {
  height: 36px;
  padding: 0 10px;
  font-size: clamp(0.72rem, 2.5vw, 0.82rem);
  white-space: nowrap;
}

/* ==============================================================
   TOP NAVIGATION TABS (Stone Tabs Row)
   ============================================================== */
.top-nav-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 8px;
  width: 100%;
}

.nav-tab-btn {
  height: 40px;
  padding: 0 3px;
  font-size: clamp(0.65rem, 2.4vw, 0.78rem);
  border-radius: 0;
  border: none;
  background: url('../assets/icons/stone_btn.png') no-repeat center center / 100% 100%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  color: #1a130c;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  min-width: 0;
}

.nav-tab-btn:active {
  transform: translateY(2px) scale(0.98);
}

.nav-tab-btn.active {
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.95)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6)) brightness(1.1);
  color: #0b0704;
}

/* ==============================================================
   DAILY INCOME METER
   ============================================================== */
.income-meter {
  display: flex;
  align-items: center;
  justify-content: center; /* Centered towards the middle */
  gap: 22px; /* Nicely spaced in the center */
  padding: 6px 20px;
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  margin-bottom: 12px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
}

.income-label {
  font-size: clamp(0.76rem, 2.7vw, 0.86rem);
  font-weight: 800;
  color: #2c251e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.income-rate {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 900;
  color: #1a120b;
  font-size: clamp(0.82rem, 2.8vw, 0.94rem);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  white-space: nowrap;
}

.income-rate .icon-gold {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==============================================================
   FLEET VIEW: CHARACTER SHOWCASE & 12 SLOTS GRID
   ============================================================== */
.fleet-arena {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 7px;
  margin-bottom: 14px;
  align-items: stretch;
  direction: ltr; /* Keeps active pirate on left and crew slots on right consistently */
}

/* Left Showcase Plinth (Broad sturdy carved rock monolith) */
.active-pirate-card {
  background: url('../assets/icons/stone_slab.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.85));
  padding: 24px 8px 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: visible;
  min-width: 0;
}

.active-pirate-bg-glow {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.active-pirate-figure {
  width: 100%;
  height: 136px;
  min-height: 136px;
  max-height: 136px;
  flex: 0 0 136px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1;
  position: relative;
  margin-top: 12px;
  margin-bottom: 6px;
}

.active-pirate-figure img {
  max-height: 100%;
  max-width: 95%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.75));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pirate-level-pill {
  position: relative;
  bottom: auto;
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  border: none;
  padding: 3px 16px;
  border-radius: 0;
  font-weight: 900;
  font-size: 0.86rem;
  color: #1a120b;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  z-index: 2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  margin-top: 3px;
  margin-bottom: 2px;
}

.live-loot-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: clamp(0.9rem, 3.2vw, 1.02rem);
  font-weight: 900;
  color: #1a140e;
  margin: 4px 0 8px 0;
  z-index: 2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.live-loot-counter .icon-gold,
.live-loot-counter .icon-gem {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* COLLECT Button (Rounded chiseled river rock tablet) */
.btn-collect {
  margin-top: auto;
  margin-bottom: 4px;
  width: 86%;
  max-width: 130px;
  height: 35px;
  padding: 0 8px;
  font-size: clamp(0.72rem, 2.5vw, 0.82rem);
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: 0.5px;
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  color: #1a120b;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.08s ease;
  z-index: 2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
  margin-right: auto;
}

.btn-collect:active {
  transform: translateY(2.5px) scale(0.98);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

/* Right: 12-Slot Crew Grid */
.crew-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 5px;
  min-width: 0;
  align-content: center;
}

.crew-slot {
  background: url('../assets/icons/stone_slot_tile.png?v=2.2') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: default;
  pointer-events: none; /* Clicking on small squares does nothing */
  user-select: none;
  -webkit-user-select: none;
  padding: 2px 1px 1px 1px;
  min-width: 0;
  box-sizing: border-box;
}

.crew-slot:active {
  transform: none;
}

.crew-slot.active {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.slot-img-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
}

.slot-empty-wrap {
  visibility: hidden;
}

.slot-img {
  max-width: 96%;
  max-height: 96%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  image-rendering: -webkit-optimize-contrast;
  transform: scale(1.15);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Unowned Ghost/Silhouette character in 12-slot grid (matches FlyMage stone etching reference) */
.slot-img.slot-img-unowned {
  filter: grayscale(100%) brightness(0.72) contrast(1.15);
  opacity: 0.22;
}

.crew-slot.is-owned .slot-img {
  opacity: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.vault-parrot-img {
  max-height: 100%;
  max-width: 98%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.75));
  animation: parrotGentleSway 4s ease-in-out infinite;
}

@keyframes parrotGentleSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(0.8deg); }
}

.slot-level-num {
  font-size: clamp(0.76rem, 2.5vw, 0.88rem);
  font-weight: 900;
  color: #1a120b;
  line-height: 1;
  margin-top: 0;
  margin-bottom: 2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  letter-spacing: -0.3px;
  pointer-events: none;
}

.crew-slot.is-owned .slot-level-num {
  color: #150b03;
  font-weight: 900;
}

.crew-slot.is-empty .slot-level-num {
  color: #2b1f14;
  font-weight: 900;
  opacity: 0.95;
}

/* ==============================================================
   RECRUIT / TAVERN MARKET SECTION
   ============================================================== */
.market-section {
  margin-top: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-pirate);
  font-size: 0.95rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.pirate-card {
  background: url('../assets/icons/stone_slab.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  padding: 16px 8px 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 298px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.75));
  position: relative;
  box-sizing: border-box;
}

.card-figure {
  width: 100%;
  height: 124px;
  min-height: 124px;
  max-height: 124px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 12px;
  flex: 0 0 124px;
  position: relative;
}

.card-figure img {
  max-width: 92%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease, opacity 0.35s ease;
}

/* Owned Character: full vibrant colors with drop shadow */
.card-figure.owned img {
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65));
  opacity: 1;
}

.pirate-card:hover .card-figure.owned img {
  transform: scale(1.05);
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.75));
}

/* Locked/Unpurchased Character: ghostly stone watermark silhouette matching FlyMage reference */
.card-figure.locked img {
  filter: grayscale(100%) brightness(0.72) contrast(1.15);
  opacity: 0.20;
}

.pirate-card:hover .card-figure.locked img {
  opacity: 0.32;
  transform: scale(1.03);
}

.card-name {
  font-size: clamp(0.78rem, 2.7vw, 0.88rem);
  font-weight: 900;
  color: #1a140e;
  text-align: center;
  margin-top: 2px;
  margin-bottom: 4px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 94%;
  line-height: 1.2;
}

.card-stats-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  margin-bottom: 10px;
  width: 100%;
  line-height: 1.15;
}

.card-daily-pct {
  font-size: clamp(0.68rem, 2.4vw, 0.76rem);
  font-weight: 800;
  color: #3d3224;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
  line-height: 1.15;
}

.card-daily-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: clamp(0.78rem, 2.7vw, 0.86rem);
  font-weight: 900;
  color: #1a120b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  line-height: 1.15;
}

.card-daily-gold .icon-gold {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.card-buy-btn {
  margin-top: auto;
  margin-bottom: 6px;
  width: 86%;
  height: 35px;
  padding: 0 6px;
  font-size: clamp(0.76rem, 2.7vw, 0.86rem);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: url('../assets/icons/stone_pill.png') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 0;
  color: #1a120b;
  cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.5));
  transition: transform 0.08s ease, filter 0.08s ease;
  z-index: 2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.card-buy-btn:active {
  transform: translateY(2px) scale(0.98);
}

.card-buy-btn .icon-gold,
.card-buy-btn .icon-gem {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ==============================================================
   PARTNERS / REFERRALS VIEW
   ============================================================== */
.fleet-view, .partners-view, .profile-view, .finance-view, .admin-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.fleet-view.active, .partners-view.active, .profile-view.active, .finance-view.active, .admin-view.active {
  display: flex;
}

.parchment-box {
  background: rgba(25, 17, 13, 0.88);
  border: 1.5px solid var(--bg-card-border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}

.stats-dual-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card-item {
  background: rgba(45, 32, 25, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.stat-card-title {
  font-size: 0.75rem;
  color: #baa78e;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.partners-view {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.partners-view.active {
  display: flex;
}

/* 1. Top Parchment Card */
.flymage-parchment-card {
  background: linear-gradient(180deg, #ede7dc 0%, #ded7c8 100%);
  border: 2px solid #b2a591;
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
}

.flymage-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.flymage-input-pill {
  flex: 1;
  min-width: 0;
  height: 40px;
  background: #c3baa9;
  border: 1.5px solid #9c907e;
  border-bottom: 2px solid #827665;
  border-radius: 10px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.icon-gold-pill {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}

.flymage-pill-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1a1209;
}

.flymage-link-icon {
  font-size: 1.05rem;
  color: #2b2014;
  opacity: 0.85;
}

.flymage-pill-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f170f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  font-family: monospace;
}

.flymage-stone-btn {
  width: 96px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #e4ded2 0%, #cdc5b5 100%);
  border: 1.5px solid #918572;
  border-bottom: 3.5px solid #635745;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.88rem;
  color: #241a10;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.08s ease, border-bottom-width 0.08s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flymage-stone-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1.5px;
}

/* Row 3: 2 Feature Reward Tiles (10% Character Purchases + 25 Gold per Invite) */
.flymage-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.flymage-tile {
  background: #cec5b5;
  border: 1.5px solid #a49784;
  border-radius: 9px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.flymage-tile-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 5px;
}

.flymage-tile-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.pirate-avatar-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.flymage-tile-pct {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1a1209;
  line-height: 1;
}

.flymage-tile-desc {
  font-size: 0.72rem;
  line-height: 1.3;
  color: #3b3023;
  font-weight: 600;
  margin: 0;
}

/* 2. Middle Section: 2 Carved Stone Slabs */
.flymage-slabs-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 4px 0;
}

.flymage-stone-slab {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flymage-slab-header {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 3px solid #5e5241;
  border-radius: 8px;
  padding: 5px 8px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: #382c1f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.flymage-slab-body {
  background: linear-gradient(180deg, #dfd8cb 0%, #cdc5b4 100%);
  border: 1.5px solid #857865;
  border-bottom: 3px solid #5e5241;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #1a1209;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* 3. Bottom Section: Activity Table */
.flymage-table-card {
  background: linear-gradient(180deg, #ede7dc 0%, #ded7c8 100%);
  border: 2px solid #b2a591;
  border-radius: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.flymage-table-card::-webkit-scrollbar {
  height: 4px;
}

.flymage-table-card::-webkit-scrollbar-thumb {
  background: rgba(133, 120, 101, 0.4);
  border-radius: 4px;
}

.flymage-crew-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.flymage-crew-table thead tr {
  background: #cbd3c3;
  border-bottom: 2px solid #9fae94;
}

.flymage-crew-table th {
  color: #273423;
  font-weight: 800;
  font-size: 0.76rem;
  padding: 8px 4px;
  font-family: var(--font-body);
  text-align: center;
  white-space: nowrap;
}

/* Explicit Proportional Column Widths - Total: 100% */
.flymage-crew-table .th-date,
.flymage-crew-table td.col-date {
  width: 25%;
  text-align: center;
}

.flymage-crew-table .th-user,
.flymage-crew-table td:nth-child(2) {
  width: 36%;
  text-align: center;
}

.flymage-crew-table .th-deposit,
.flymage-crew-table td.col-deposit {
  width: 18%;
  text-align: center;
}

.flymage-crew-table .th-income,
.flymage-crew-table td.col-income {
  width: 21%;
  text-align: center;
  padding-right: 6px;
}

.flymage-crew-table tbody tr {
  border-bottom: 1px dashed #b7ab97;
  transition: background 0.15s ease;
}

.flymage-crew-table tbody tr:last-child {
  border-bottom: none;
}

.flymage-crew-table tbody tr.highlighted-row {
  background: rgba(212, 175, 55, 0.22);
}

.flymage-crew-table td {
  padding: 7px 4px;
  vertical-align: middle;
  color: #241b12;
  font-weight: 600;
}

.col-date {
  font-size: 0.68rem;
  color: #3b2f23;
  line-height: 1.25;
  font-family: monospace;
  text-align: center;
}

.col-date .col-time {
  display: block;
  font-size: 0.62rem;
  opacity: 0.75;
  color: #554433;
}

.col-user {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  padding: 0 2px;
}

.user-avatar-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #8e806d;
}

.user-avatar-placeholder {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3e2e1e;
  color: #ffd700;
  font-weight: 800;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name-text {
  font-weight: 800;
  color: #181109;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 78px;
  font-size: 0.72rem;
}

.col-deposit {
  font-weight: 700;
  color: #2b2015;
  text-align: center;
  white-space: nowrap;
  font-size: 0.72rem;
}

.col-income {
  text-align: center;
  font-weight: 900;
  color: #1a1209;
  white-space: nowrap;
}

.col-income-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: rgba(212, 175, 55, 0.15);
  padding: 2px 5px;
  border-radius: 6px;
  border: 1px solid rgba(180, 140, 40, 0.25);
}

.col-income-wrap span {
  font-size: 0.76rem;
  font-weight: 900;
  color: #1b1208;
}

.icon-gold-small {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==============================================================
   PROFILE VIEW
   ============================================================== */
.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold-primary);
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c140e;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

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

.profile-name {
  font-family: var(--font-pirate);
  font-size: 1.25rem;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 2px;
}

.profile-id-badge {
  text-align: center;
  font-size: 0.82rem;
  color: #ab9b85;
  margin-bottom: 12px;
}

.profile-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.profile-action-btn {
  padding: 10px 8px;
  font-size: clamp(0.74rem, 2.5vw, 0.86rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ==============================================================
   DEPOSIT & WITHDRAW VIEWS
   ============================================================== */
.input-label {
  font-size: 0.82rem;
  color: #c9bea9;
  margin-bottom: 4px;
  display: block;
}

.pirate-input {
  width: 100%;
  background: #0f0a07;
  border: 1px solid #4a3726;
  border-radius: 8px;
  color: #fff;
  padding: 10px 12px;
  font-size: 0.95rem;
  margin-bottom: 10px;
  outline: none;
}

.pirate-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* ==============================================================
   ADMIN PANEL VIEW (FlyMage / Partners Parchment Style)
   ============================================================== */
.admin-parchment-card {
  padding: 14px 12px;
}

.admin-panel-title {
  font-family: var(--font-pirate, serif);
  font-size: 1.25rem;
  font-weight: 900;
  color: #1a1209;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  text-align: center;
}

.admin-sub-title {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 800;
  color: #241a10;
  margin-bottom: 8px;
}

.admin-badge {
  background: linear-gradient(180deg, #d32f2f, #9a0007);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid #7f0000;
}

.admin-tabs-nav {
  display: flex;
  gap: 5px;
  background: #c3baa9;
  border: 1.5px solid #9c907e;
  border-bottom: 2px solid #827665;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
}
.admin-tabs-nav::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  flex: 1 0 auto;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  background: transparent;
  color: #3b2f21;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.admin-tab-btn.active {
  background: linear-gradient(180deg, #ede7dc 0%, #ded7c8 100%);
  color: #1a1209;
  border: 1px solid #8e806c;
  border-bottom: 2.5px solid #635745;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  font-weight: 900;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-grid-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.admin-grid-stats .stat-card-item,
.stats-dual-cards .stat-card-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-grid-stats .stat-card-title,
.stats-dual-cards .stat-card-title {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 3px solid #5e5241;
  border-radius: 8px;
  padding: 5px 8px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #382c1f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.admin-grid-stats .stat-card-value,
.stats-dual-cards .stat-card-value {
  background: linear-gradient(180deg, #dfd8cb 0%, #cdc5b4 100%);
  border: 1.5px solid #857865;
  border-bottom: 3px solid #5e5241;
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
  color: #1a1209;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.stats-dual-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.admin-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.admin-input-pill {
  flex: 1;
  min-width: 0;
  height: 40px;
  background: #c3baa9;
  border: 1.5px solid #9c907e;
  border-bottom: 2px solid #827665;
  border-radius: 10px;
  padding: 0 12px;
  color: #1a1209;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-body);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  outline: none;
}

.admin-input-pill::placeholder {
  color: rgba(43, 32, 20, 0.55);
  font-weight: 600;
}

.admin-input-pill:focus {
  border-color: #5e5241;
  background: #cfc6b5;
}

.admin-user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #cec5b5;
  border: 1.5px solid #a49784;
  border-bottom: 2.5px solid #756a59;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.admin-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d4af37, #aa820a);
  border: 2px solid #7c5d00;
  color: #1a120b;
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}

.admin-user-meta {
  flex: 1;
  min-width: 0;
}

.admin-user-name {
  font-weight: 900;
  font-size: 0.95rem;
  color: #1a1209;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-user-sub {
  font-size: 0.74rem;
  color: #4a3c2c;
  font-weight: 700;
}

.admin-status-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-status-active {
  background: #c8e6c9;
  color: #1b5e20;
  border: 1px solid #81c784;
}

.admin-status-banned {
  background: #ffcdd2;
  color: #b71c1c;
  border: 1px solid #e57373;
}

.admin-section-title {
  font-size: 0.88rem;
  font-weight: 900;
  color: #1a1209;
  margin: 12px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-fleet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.admin-slot-item {
  background: url('../assets/icons/stone_slot_tile.png?v=2.2') no-repeat center center / 100% 100%;
  border: none;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  min-height: 84px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.admin-slot-item.has-pirate {
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.admin-slot-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin: 2px 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.admin-table-wrap {
  max-height: 200px;
  overflow-y: auto;
  background: linear-gradient(180deg, #ede7dc 0%, #ded7c8 100%);
  border: 1.5px solid #b2a591;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.admin-data-table th {
  background: #cbd3c3;
  color: #273423;
  border-bottom: 2px solid #9fae94;
  padding: 6px 6px;
  text-align: left;
  position: sticky;
  top: 0;
  font-weight: 800;
  font-size: 0.74rem;
}

.admin-data-table td {
  padding: 6px 6px;
  border-bottom: 1px solid #c4b9a7;
  color: #241a10;
  font-weight: 700;
}

.admin-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-catalog-item {
  background: #cec5b5;
  border: 1.5px solid #a49784;
  border-bottom: 2.5px solid #756a59;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.admin-catalog-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.admin-catalog-info {
  flex: 1;
  min-width: 0;
}

.admin-catalog-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 4px;
}

.admin-mini-input {
  background: #c3baa9;
  border: 1.5px solid #9c907e;
  border-bottom: 2px solid #827665;
  color: #1a1209;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.75rem;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

.admin-mini-input:focus {
  border-color: #5e5241;
  background: #cfc6b5;
}

/* ==============================================================
   FLOATING LANGUAGE SWITCHER BUTTON
   ============================================================== */
.lang-selector-btn {
  position: fixed;
  bottom: 12px;
  left: 14px;
  z-index: 100;
  background: linear-gradient(180deg, #f4f0e6 0%, #ded9cf 60%, #9e9587 100%);
  border: 1px solid #5c5549;
  border-radius: 8px;
  padding: 6px 14px;
  color: #1a140e;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 
    inset 0 1px 0 #ffffff,
    inset 0 -2px 0 #5c5549,
    0 4px 12px rgba(0, 0, 0, 0.7);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.lang-selector-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 #5c5549,
    0 2px 5px rgba(0, 0, 0, 0.8);
}

.lang-selector-btn .arrow-icon {
  font-size: 0.65rem;
  color: #5c5549;
}


/* ==============================================================
   MODALS (Language Drawer, Alerts, Confirmations)
   ============================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: #1c140f;
  border-top: 2px solid var(--gold-primary);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 500px;
  padding: 20px 16px 30px 16px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-title {
  font-family: var(--font-pirate);
  color: var(--gold-light);
  font-size: 1.15rem;
}

.modal-close-btn {
  background: none;
  border: none;
  color: #8c7b67;
  font-size: 1.5rem;
  cursor: pointer;
}

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

.lang-item-btn {
  background: rgba(45, 32, 25, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f1ebd9;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-item-btn:active, .lang-item-btn.selected {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* Toast Message */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(180deg, #f4f0e6 0%, #ded9cf 100%);
  color: #1a140e;
  border: 1px solid #786f62;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  font-size: 0.88rem;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* ==============================================================
   PARROT ONBOARDING & CAPTAIN'S GUIDE MODAL
   ============================================================== */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 5, 4, 0.88);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.onboarding-overlay.active {
  display: flex;
}

.onboarding-card {
  background: linear-gradient(180deg, #221610 0%, #150d09 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  padding: 20px 16px 18px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 215, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: popIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.parrot-mascot-wrapper {
  width: 110px;
  height: 140px;
  margin-top: -65px;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
  animation: parrotBob 3.5s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parrot-mascot-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@keyframes parrotBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.onboarding-speech-bubble {
  background: rgba(36, 25, 19, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  text-align: center;
  margin-bottom: 14px;
  position: relative;
}

.onboarding-speech-title {
  font-family: var(--font-pirate);
  color: var(--gold-light);
  font-size: 1.05rem;
  margin-bottom: 4px;
  font-weight: 800;
}

.onboarding-speech-text {
  font-size: 0.84rem;
  color: #dfd5c2;
  line-height: 1.45;
}

.onboarding-step-content {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
}

.onboarding-step-content.active {
  display: flex;
}

.tutorial-feature-card {
  background: rgba(45, 32, 25, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 12px;
  width: 100%;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tutorial-feature-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.tutorial-feature-body h4 {
  font-size: 0.92rem;
  color: var(--gold-light);
  margin-bottom: 3px;
  font-weight: 800;
}

.tutorial-feature-body p {
  font-size: 0.8rem;
  color: #d2c5b0;
  line-height: 1.4;
}

.onboarding-dots {
  display: flex;
  gap: 6px;
  margin: 10px 0 14px 0;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
}

.onboarding-dot.active {
  background: var(--gold-primary);
  width: 20px;
  border-radius: 10px;
  box-shadow: 0 0 8px var(--gold-primary);
}

.onboarding-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* ==============================================================
   MULTI-CRYPTO DEPOSIT & LIVE INVOICE STYLES
   ============================================================== */
.deposit-rate-banner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(78, 52, 46, 0.4));
  border: 1px dashed rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.crypto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.crypto-grid::-webkit-scrollbar {
  width: 4px;
}
.crypto-grid::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.crypto-card {
  background: rgba(30, 20, 15, 0.7);
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.crypto-card:hover {
  background: rgba(45, 30, 22, 0.85);
  border-color: rgba(212, 175, 55, 0.5);
}

.crypto-card.selected {
  background: linear-gradient(135deg, rgba(62, 39, 35, 0.95), rgba(40, 25, 20, 0.95));
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.crypto-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.2);
}

.crypto-card-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
}

[dir="rtl"] .crypto-card-info {
  text-align: right;
}

.crypto-card-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f5f0e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crypto-card-net {
  font-size: 0.68rem;
  color: var(--gold-primary);
  font-weight: 700;
}

.crypto-card-min {
  font-size: 0.65rem;
  color: #9e8e7a;
}

.deposit-preset-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.deposit-preset-chip, .withdraw-preset-chip {
  background: rgba(40, 28, 22, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deposit-preset-chip:hover, .deposit-preset-chip:active,
.withdraw-preset-chip:hover, .withdraw-preset-chip:active {
  background: var(--gold-primary);
  color: #1e130b;
}

.deposit-calc-preview {
  background: rgba(20, 14, 10, 0.6);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 14px;
}

/* Invoice Active View */
.deposit-invoice-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.invoice-header-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.invoice-back-btn {
  background: rgba(50, 35, 25, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #dfd5c2;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.invoice-amount-callout {
  background: linear-gradient(135deg, rgba(62, 39, 35, 0.9), rgba(30, 20, 15, 0.95));
  border: 1.5px solid var(--gold-primary);
  border-radius: 12px;
  padding: 10px 14px;
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

.invoice-amount-val {
  font-family: var(--font-pirate);
  font-size: 1.45rem;
  color: var(--gold-light);
  font-weight: 900;
  letter-spacing: 0.5px;
}

.invoice-amount-sub {
  font-size: 0.78rem;
  color: #baa78e;
  margin-top: 2px;
}

.invoice-qr-wrap {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
  display: inline-flex;
}

.invoice-qr-img {
  width: 170px;
  height: 170px;
  display: block;
}

.invoice-addr-container {
  width: 100%;
  background: rgba(20, 14, 10, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.invoice-addr-text {
  font-family: monospace;
  font-size: 0.76rem;
  color: #f7eed7;
  word-break: break-all;
  user-select: all;
  line-height: 1.25;
}

.invoice-copy-btn {
  background: var(--gold-primary);
  color: #1a1008;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 6px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.invoice-copy-btn:active {
  transform: scale(0.95);
}

.invoice-status-box {
  width: 100%;
  background: rgba(30, 20, 15, 0.9);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #dfd5c2;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.status-radar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 8px #00e676;
  animation: radarPulse 1.4s infinite ease-in-out;
  flex-shrink: 0;
}

.status-radar-dot.waiting {
  background: #ffb300;
  box-shadow: 0 0 8px #ffb300;
}

.status-radar-dot.completed {
  background: #00e676;
  box-shadow: 0 0 12px #00e676;
  animation: none;
}

@keyframes radarPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

.invoice-success-state {
  width: 100%;
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.4), rgba(46, 125, 50, 0.2));
  border: 1.5px solid #00e676;
  border-radius: 12px;
  margin-top: 10px;
  display: none;
}

/* ==============================================================
   POLISHED STONE & PARCHMENT FINANCES (MATCHING REFERRAL STYLE)
   ============================================================== */
.finance-view .parchment-box {
  background: linear-gradient(180deg, #ede7dc 0%, #ded7c8 100%);
  border: 2px solid #b2a591;
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.finance-view .modal-title {
  color: #271e14;
  font-family: var(--font-body);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.finance-view p {
  color: #554433 !important;
  font-weight: 600;
}

.finance-view .deposit-rate-banner {
  background: #cec5b5;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.82rem;
  color: #271e14;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.finance-view .deposit-rate-banner span,
.finance-view .deposit-rate-banner div {
  color: #271e14;
}

.finance-view .deposit-rate-banner strong {
  color: #1a1209;
}

.crypto-slab-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
}

/* Polished Stone Slab (Exact 1:1 Match to Referral Section Stone Slabs) */
.crypto-stone-slab,
.selected-slab-preview {
  background: linear-gradient(180deg, #dfd8cb 0%, #cdc5b4 100%);
  border: 1.5px solid #857865;
  border-bottom: 3.5px solid #5e5241;
  border-radius: 10px;
  min-height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
  user-select: none;
  position: relative;
}

.crypto-stone-slab:hover {
  background: linear-gradient(180deg, #e8e2d6 0%, #d8d0c0 100%);
  border-color: #6d5f4c;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.28);
}

.crypto-stone-slab:active {
  transform: translateY(2px);
  border-bottom-width: 1.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.selected-slab-preview {
  cursor: default;
  margin-bottom: 12px;
}

.slab-coin-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d3cbbd 0%, #bfb5a3 100%);
  border: 1.5px solid #857865;
  border-bottom: 2px solid #5e5241;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.slab-coin-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
}

.slab-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  text-align: left;
}

[dir="rtl"] .slab-details {
  text-align: right;
}

.slab-title {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 0.98rem;
  color: #1f170e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
  margin-bottom: 2px;
}

.slab-meta-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #4b3d2e;
  line-height: 1.25;
  font-weight: 700;
}

.slab-meta-label {
  color: #685744;
  font-weight: 600;
}

.slab-meta-val {
  color: #1a1209;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.icon-gold-inline {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: -2px;
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(255, 215, 0, 0.45));
}

.icon-gold-chip {
  width: 13px;
  height: 13px;
  object-fit: contain;
  vertical-align: -1px;
  display: inline-block;
  margin-left: 2px;
}

[dir="rtl"] .icon-gold-chip {
  margin-left: 0;
  margin-right: 2px;
}

.slab-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  color: #382c1f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}

.crypto-stone-slab:hover .slab-arrow {
  transform: translateX(2px);
  background: #c5bca9;
}

[dir="rtl"] .slab-arrow {
  margin-left: 0;
  margin-right: auto;
  transform: rotate(180deg);
}

[dir="rtl"] .crypto-stone-slab:hover .slab-arrow {
  transform: rotate(180deg) translateX(2px);
}

.crypto-action-sheet {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Action Sheet Form Elements in Referral Stone Theme */
.finance-view .input-label {
  color: #382c1f;
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.finance-view .pirate-input {
  background: #e5ded1;
  border: 1.5px solid #857865;
  border-radius: 8px;
  color: #1a1209;
  font-weight: 800;
  font-size: 1rem;
}

.finance-view .pirate-input:focus {
  border-color: #5e5241;
  background: #ede7dc;
  box-shadow: 0 0 0 2px rgba(94, 82, 65, 0.25);
}

.deposit-preset-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.deposit-preset-chip, .withdraw-preset-chip {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  color: #241a10;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.80rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: all 0.1s ease;
}

.deposit-preset-chip:hover, .withdraw-preset-chip:hover {
  background: #cec5b5;
  transform: translateY(-1px);
}

.deposit-preset-chip:active, .withdraw-preset-chip:active {
  transform: translateY(1.5px);
  border-bottom-width: 1.5px;
}

.deposit-calc-preview {
  background: #cec5b5;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  border-radius: 9px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  margin-bottom: 14px;
  color: #2b1f13;
  font-weight: 700;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.deposit-calc-preview span:first-child {
  color: #4b3d2e !important;
  font-weight: 700 !important;
}

.deposit-calc-preview span:last-child,
#depositGoldPreview,
#withdrawCryptoPreview,
#withdrawCryptoSymbol {
  color: #110c07 !important;
  font-weight: 900 !important;
}

#withdrawAvailableGold {
  color: #110c07 !important;
  font-weight: 900 !important;
}

#withdrawAddressHint {
  color: #110c07 !important;
  font-weight: 800 !important;
}

#invoiceGoldAmount {
  color: #110c07 !important;
  font-weight: 900 !important;
}

.invoice-header-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.invoice-back-btn {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  color: #2b1f13;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.invoice-back-btn:active {
  transform: translateY(1px);
}

.invoice-amount-callout {
  background: linear-gradient(180deg, #dfd8cb 0%, #cdc5b4 100%);
  border: 1.5px solid #857865;
  border-bottom: 3.5px solid #5e5241;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  width: 100%;
  margin-bottom: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.invoice-amount-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: #1f170e;
}

.invoice-amount-sub {
  font-size: 0.85rem;
  color: #4b3d2e;
}

.invoice-addr-container {
  background: #dfd8cb;
  border: 1.5px solid #857865;
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.invoice-addr-text {
  font-family: monospace;
  font-size: 0.78rem;
  color: #1f170e;
  word-break: break-all;
  flex: 1;
}

.invoice-copy-btn {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 2px solid #5e5241;
  border-radius: 6px;
  padding: 5px 10px;
  color: #2b1f13;
  font-weight: 800;
  font-size: 0.76rem;
  cursor: pointer;
  flex-shrink: 0;
}

.invoice-status-box {
  background: #cec5b5;
  border: 1.5px solid #857865;
  border-radius: 9px;
  padding: 10px 14px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #2b1f13;
  font-size: 0.84rem;
  font-weight: 700;
}

/* ==============================================================
   APP STARTUP SPLASH LOADER (SMOOTH 1S STARTUP TRANSITION)
   ============================================================== */
.app-splash-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at center, #26190f 0%, #0d0905 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  opacity: 1;
  visibility: visible;
  user-select: none;
}

.app-splash-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 20px;
}

.splash-coin-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashCoinPulse 2s ease-in-out infinite;
}

.splash-coin-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6));
  animation: splashCoinSpin 3s ease-in-out infinite;
}

.splash-coin-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
  filter: blur(8px);
}

.splash-title {
  font-family: var(--font-pirate, 'Pirata One', serif);
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: #ffd700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 14px rgba(255, 215, 0, 0.5);
}

.splash-sub {
  font-size: 0.84rem;
  color: #c9bca6;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.splash-bar {
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.splash-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  animation: splashBarAnim 1.4s ease-in-out infinite;
}

@keyframes splashCoinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes splashCoinSpin {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg); }
}

@keyframes splashBarAnim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ==============================================================
   FLY-MAGE STYLE WITHDRAW SHEET (EXACT SCREENSHOT MATCH)
   ============================================================== */
.withdraw-flymage-card {
  width: 100%;
}

.flymage-parchment-sheet {
  background: linear-gradient(180deg, #eae4d5 0%, #ded7c7 100%);
  border: 1.5px solid #b8ab97;
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(180, 165, 140, 0.12);
  margin-top: 6px;
}

.flymage-field-group {
  margin-bottom: 13px;
  text-align: left;
}

[dir="rtl"] .flymage-field-group {
  text-align: right;
}

.flymage-label {
  display: block;
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
  color: #211910;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.flymage-input-box {
  background: linear-gradient(180deg, #dcd5c6 0%, #ccc3b1 100%);
  border: 1.5px solid #a49784;
  border-radius: 7px;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 4px 12px;
  gap: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12), 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.flymage-input-box:focus-within {
  border-color: #6d5e49;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.16), 0 0 6px rgba(109, 94, 73, 0.3);
}

.flymage-input-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.flymage-input-icon.icon-gold-coin {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 3px rgba(255, 215, 0, 0.4));
}

.flymage-dollar-sign {
  font-size: 1.45rem;
  font-weight: 900;
  color: #1a1209;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}

.flymage-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.18rem;
  font-weight: 800;
  color: #150f08;
  padding: 6px 0;
}

.flymage-input::placeholder {
  color: #7a6e5e;
  font-weight: 600;
  font-size: 0.95rem;
}

.flymage-input[readonly] {
  cursor: default;
}

.flymage-btn-wrap {
  text-align: center;
  margin-top: 18px;
  margin-bottom: 4px;
}

.flymage-payout-btn {
  background: linear-gradient(180deg, #b8ab97 0%, #9c8b78 100%);
  border: 1.8px solid #5a4b3b;
  border-bottom: 3.5px solid #3c3125;
  border-radius: 12px;
  color: #1a1208;
  font-family: var(--font-body, system-ui, -apple-system, sans-serif);
  font-size: 1.05rem;
  font-weight: 900;
  padding: 10px 36px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  transition: all 0.12s ease;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  display: inline-block;
  min-width: 150px;
  box-sizing: border-box;
}

.flymage-payout-btn:hover {
  background: linear-gradient(180deg, #c4b7a3 0%, #a89783 100%);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
}

.flymage-payout-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1.8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.flymage-payout-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

/* ==============================================================
   PROFILE VIEW & TRANSACTION HISTORY (MATCHING PARTNERS STYLE)
   ============================================================== */
.profile-view {
  display: none;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.profile-view.active {
  display: flex;
}

.tx-filter-chips {
  display: flex;
  gap: 5px;
}

.tx-filter-chip {
  background: #bfb5a3;
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #382c1f;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.tx-filter-chip:hover {
  background: #cac0af;
}

.tx-filter-chip.active {
  background: linear-gradient(180deg, #9e8d7a 0%, #7d6e5d 100%);
  color: #ffffff;
  border-color: #4b3d2f;
  border-bottom-color: #33281d;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.profile-tx-list {
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* FlyMage Transaction Table (Matching User Screenshot) */
.flymage-tx-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}

.flymage-tx-table thead tr {
  background: #cbd3c3;
  border-bottom: 2px solid #9fae94;
}

.flymage-tx-table th {
  color: #273423;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 8px 4px;
  font-family: var(--font-body);
  text-align: center;
  white-space: nowrap;
}

.flymage-tx-table .th-w-date { width: 25%; }
.flymage-tx-table .th-w-method { width: 30%; }
.flymage-tx-table .th-w-sum { width: 15%; }
.flymage-tx-table .th-w-gold { width: 18%; }
.flymage-tx-table .th-w-status { width: 12%; }

.flymage-history-row {
  border-bottom: 1.5px solid #c8bead;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.1s ease;
}

.flymage-history-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.1);
}

.flymage-history-row td {
  padding: 8px 4px;
  vertical-align: middle;
}

.col-w-date {
  text-align: center;
  font-size: 0.73rem;
  color: #2c2014;
  font-weight: 700;
  white-space: nowrap;
}

.col-w-method {
  text-align: center;
}

.method-cell-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.history-coin-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.history-address-text {
  font-family: monospace;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1a1209;
  letter-spacing: -0.2px;
}

.col-w-sum {
  text-align: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #1a1209;
}

.col-w-gold {
  text-align: center;
}

.gold-cell-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #1a1209;
}

.col-w-status {
  text-align: center;
}

.flymage-status-check {
  font-size: 1.25rem;
  font-weight: 900;
  color: #181109;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.flymage-status-cross {
  font-size: 1.05rem;
  font-weight: 900;
  color: #b71c1c;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.flymage-status-spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  animation: flymageSpinDots 1.2s steps(8, end) infinite;
}

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

.profile-tx-item {
  background: linear-gradient(180deg, #dfd8cb 0%, #cdc5b4 100%);
  border: 1.5px solid #857865;
  border-bottom: 2.5px solid #5e5241;
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.1s ease;
}

.profile-tx-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.profile-tx-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1.5px solid #857865;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.profile-tx-icon-badge.deposit {
  background: linear-gradient(180deg, #c8e6c9 0%, #a5d6a7 100%);
  border-color: #66bb6a;
}

.profile-tx-icon-badge.withdraw {
  background: linear-gradient(180deg, #ffe0b2 0%, #ffcc80 100%);
  border-color: #ffa726;
}

.profile-tx-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

[dir="rtl"] .profile-tx-info {
  text-align: right;
}

.profile-tx-type {
  font-size: 0.86rem;
  font-weight: 900;
  color: #1a1209;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.profile-tx-date {
  font-size: 0.72rem;
  color: #554433;
  font-weight: 700;
  line-height: 1.2;
}

.profile-tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

[dir="rtl"] .profile-tx-right {
  align-items: flex-start;
}

.profile-tx-amount {
  font-size: 0.92rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.profile-tx-amount.positive {
  color: #1b5e20;
}

.profile-tx-amount.negative {
  color: #a72300;
}

.profile-tx-status {
  font-size: 0.68rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.profile-tx-status.completed,
.profile-tx-status.approved {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.profile-tx-status.pending,
.profile-tx-status.waiting {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.profile-tx-status.rejected,
.profile-tx-status.failed {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.profile-tx-empty {
  text-align: center;
  padding: 24px 10px;
  color: #554433;
  font-weight: 700;
  font-size: 0.86rem;
}

/* Payout Button States */
.flymage-payout-btn.disabled {
  opacity: 0.65;
  filter: grayscale(0.5);
  cursor: not-allowed;
}

/* ============================================================
   TELEGRAM-ONLY EXCLUSIVE GATE SCREEN
   ============================================================ */
.telegram-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, #1b1613 0%, #0a0705 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.telegram-gate-card {
  max-width: 420px;
  width: 100%;
  background: linear-gradient(180deg, #2c221a 0%, #1c1510 100%);
  border: 3px solid #8c6d48;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), inset 0 2px 8px rgba(255, 215, 0, 0.15);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gate-pirate-badge {
  position: relative;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, #523f2f 0%, #291c13 100%);
  border: 2px solid #e2b05c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(226, 176, 92, 0.35);
  margin-bottom: 4px;
}

.gate-coin-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.gate-skull-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.gate-title {
  color: #ffde82;
  font-size: 1.7rem;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 0 15px rgba(255,222,130,0.4);
  margin: 0;
  letter-spacing: 0.5px;
}

.gate-subtitle {
  color: #eed6b0;
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.gate-desc {
  color: #bda68c;
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 600;
  margin: 4px 0 12px 0;
}

.gate-launch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #23160a !important;
  background: linear-gradient(180deg, #ffd966 0%, #e5a932 50%, #ba811c 100%) !important;
  border: 2px solid #fff0a8 !important;
  border-bottom: 4px solid #7c5108 !important;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(229, 169, 50, 0.45);
  transition: transform 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}

.gate-launch-btn:active {
  transform: translateY(2px);
  filter: brightness(0.95);
}

.gate-bot-handle {
  color: #8c765f;
  font-size: 0.85rem;
  margin-top: 4px;
}

.gate-bot-handle b {
  color: #e2b05c;
}

/* ============================================================
   MANDATORY CHANNEL SUBSCRIPTION MODAL (PIRATE THEMED)
   ============================================================ */
.sub-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 7, 5, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sub-modal-card {
  max-width: 380px;
  width: 100%;
  background: linear-gradient(180deg, #2e231b 0%, #1c1510 100%);
  border: 2.5px solid #d4af37;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), inset 0 2px 6px rgba(255, 215, 0, 0.2);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.sub-badge-wrap {
  position: relative;
  margin-bottom: 2px;
}

.sub-badge-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, #523f2f 0%, #22160e 100%);
  border: 2px solid #e2b05c;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(226, 176, 92, 0.35);
  position: relative;
}

.sub-coin-badge {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.sub-broadcast-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.sub-modal-title {
  color: #ffde82;
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.sub-modal-subtitle {
  color: #eed6b0;
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}

.sub-modal-desc {
  color: #bda68c;
  font-size: 0.84rem;
  line-height: 1.5;
  font-weight: 600;
  margin: 2px 0 8px 0;
}

.sub-channel-card {
  width: 100%;
  background: rgba(40, 30, 22, 0.9);
  border: 1.5px solid #8c6d48;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
}

.sub-channel-info {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.sub-channel-avatar {
  width: 38px;
  height: 38px;
  background: #3b2b1d;
  border: 1.5px solid #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.sub-channel-meta {
  display: flex;
  flex-direction: column;
}

.sub-channel-name {
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
}

.sub-channel-user {
  color: #e2b05c;
  font-size: 0.76rem;
  font-weight: 700;
}

.sub-join-action-btn {
  background: #2481cc;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid #54a5e5;
  box-shadow: 0 3px 10px rgba(36, 129, 204, 0.4);
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.sub-join-action-btn:active {
  transform: scale(0.96);
}

.sub-verify-btn {
  width: 100%;
  padding: 14px 0;
  font-size: 1.05rem;
  font-weight: 900;
  margin-top: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sub-alert-msg {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  width: 100%;
  box-sizing: border-box;
}

.sub-alert-msg.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.sub-alert-msg.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #66bb6a;
}

/* ==============================================================
   BANNED ACCOUNT LOCK SCREEN - 100% BLOCKING PIRATE THEME
   ============================================================== */
.banned-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000000;
  background: radial-gradient(circle at 50% 30%, #300c0c 0%, #150505 50%, #060101 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.banned-card {
  background: linear-gradient(180deg, rgba(42, 16, 16, 0.95) 0%, rgba(22, 8, 8, 0.98) 100%);
  border: 2px solid #8e2b2b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 42, 42, 0.3);
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  animation: bannedCardPulse 4s infinite alternate ease-in-out;
}

@keyframes bannedCardPulse {
  0% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 42, 42, 0.25); }
  100% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 45px rgba(255, 42, 42, 0.45); }
}

.banned-icon-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.banned-skull-glow {
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(255, 42, 42, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  animation: skullGlowAnim 2s infinite alternate ease-in-out;
}

@keyframes skullGlowAnim {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

.banned-skull-icon {
  font-size: 3.8rem;
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

.banned-lock-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 1.8rem;
  z-index: 3;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}

.banned-title {
  font-family: var(--font-pirate), var(--font-body);
  font-size: 1.45rem;
  font-weight: 900;
  color: #ff5252;
  margin-bottom: 14px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 12px rgba(255, 42, 42, 0.5);
}

.banned-reason-box {
  background: rgba(10, 3, 3, 0.7);
  border: 1px solid rgba(255, 82, 82, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  width: 100%;
}

.banned-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #e0d0c8;
}

.banned-uid-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
  font-size: 0.78rem;
  color: #a09088;
}

.banned-uid-val {
  font-family: monospace;
  font-weight: 800;
  color: #ffd700;
}

.banned-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.banned-support-btn {
  background: linear-gradient(180deg, #d4af37 0%, #aa820a 100%);
  color: #1a1209 !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px 20px;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #ffd700;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.banned-support-btn:active {
  transform: scale(0.97);
  filter: brightness(0.9);
}

.banned-close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #c4b5aa;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.15s ease;
}

.banned-close-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.banned-lang-selector {
  margin-top: 18px;
}

.banned-lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px 14px;
  color: #b0a095;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.banned-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Instant Balance Glow Pulse Animation */
@keyframes balanceGlowPulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.18); filter: brightness(1.6) drop-shadow(0 0 10px #ffd700); color: #fff8c4; text-shadow: 0 0 12px rgba(255, 215, 0, 0.9); }
  100% { transform: scale(1); filter: brightness(1); }
}

.balance-glow-pulse {
  animation: balanceGlowPulse 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  will-change: transform, filter;
}



