/* ============================
   LootRoom – Complete Stylesheet
   Dark Gaming Theme, Mobile First
   ============================ */

/* ---------- Base Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* Mobile container – ensures everything is centered and not zoomed out */
.app-container {
  width: 100%;
  max-width: 480px;
  background: #0f0f25;
  min-height: 100vh;
  position: relative;
  padding-bottom: 70px;               
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  overflow-x: hidden; /* <-- Ye line add karni hai */
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1a1a35 0%, #0f0f25 100%);
  border-bottom: 1px solid #2a2a4a;
}

.header-left .logo { height: 36px; width: auto; }
.header-right { display: flex; align-items: center; gap: 12px; }

.balance-chip {
  background: #1e1e3a;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

.login-btn {
  background: #e94560;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e94560;
  object-fit: cover;
}

.logged-in { display: none; }
.logged-out { display: none; }

.back-btn {
  color: #e94560;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
}

/* ---------- Hero Carousel ---------- */
.hero-carousel {
  margin: 16px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #1a1a35;
  height: 180px;
}

.carousel-inner { display: flex; width: 100%; height: 100%; }

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.carousel-slide.active { display: flex; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dots .dot {
  width: 8px; height: 8px;
  background: #ffffff50;
  border-radius: 50%;
}

.carousel-dots .dot.active { background: #e94560; }

/* ---------- Sections ---------- */
.section { margin: 16px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.view-all { color: #e94560; font-size: 14px; text-decoration: none; }

/* ---------- Filter Tabs ---------- */
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: #aaa;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}

/* ---------- Tournament Cards ---------- */
.tournaments-list { display: flex; flex-direction: column; gap: 12px; }

.tournament-card {
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a4a;
  transition: box-shadow 0.2s;
  cursor: pointer;
}

.tournament-card:hover { box-shadow: 0 0 10px #e9456040; }

.tournament-card .game-type {
  color: #e94560;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tournament-card h3 { margin: 6px 0; font-size: 16px; color: white; }
.tournament-card .prize { color: #f5c542; font-weight: bold; font-size: 15px; margin: 6px 0; }
.tournament-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

.empty-state { text-align: center; color: #666; padding: 30px; }

/* ---------- Game Mode Posters ---------- */
.mode-posters { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.mode-card {
  min-width: 100px;
  background: #1a1a35;
  border-radius: 12px;
  text-align: center;
  padding: 12px;
  border: 1px solid #2a2a4a;
  cursor: pointer;
}

.mode-card img {
  width: 80px; height: 80px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 6px;
}

.mode-card span { color: #ddd; font-size: 14px; font-weight: 500; }

/* ---------- Mini Leaderboard ---------- */
.mini-leaderboard .leader-item {
  display: flex;
  align-items: center;
  background: #1a1a35;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 8px;
}

.leader-item .rank { font-size: 18px; margin-right: 12px; }
.leader-item .name { flex: 1; color: white; }
.leader-item .prize { color: #f5c542; font-weight: bold; }

/* ---------- Bottom Navigation ---------- */
.bottom-nav-spacer { height: 70px; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #12122a;
  border-top: 1px solid #2a2a4a;
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #666;
  text-decoration: none;
  font-size: 12px;
}

.nav-item.active,
.nav-item:hover { color: #e94560; }

/* Larger nav icons for better visibility */
.nav-icon { font-size: 22px; margin-bottom: 2px; }

/* ---------- Glowing Effects ---------- */
@keyframes glowPulse {
  0% { text-shadow: 0 0 5px #e94560, 0 0 10px #e94560; }
  50% { text-shadow: 0 0 20px #e94560, 0 0 30px #e94560; }
  100% { text-shadow: 0 0 5px #e94560, 0 0 10px #e94560; }
}

.glowing-text { animation: glowPulse 2s infinite; color: #e94560; font-weight: bold; }

@keyframes glowingBorder {
  0% { box-shadow: 0 0 5px #e94560; }
  50% { box-shadow: 0 0 20px #e94560, 0 0 30px #e94560; }
  100% { box-shadow: 0 0 5px #e94560; }
}

.glowing-border { animation: glowingBorder 2s infinite; border: 2px solid #e94560; }

/* ---------- Form Elements ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; color: #aaa; margin-bottom: 6px; font-size: 14px; }

.form-input {
  width: 100%;
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.form-input:focus { border-color: #e94560; }
.form-input.small { width: 80px; display: inline-block; }

.method-select { display: flex; gap: 8px; }
.method-btn {
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: #aaa;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.method-btn.active,
.method-btn:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}

/* ---------- Buttons (General) ---------- */
.primary-btn {
  width: 100%;
  background: #e94560;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
}

.primary-btn:disabled { background: #555; cursor: not-allowed; }

.secondary-btn {
  width: 100%;
  background: #1e1e3a;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
}

.danger-btn {
  width: 100%;
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
}

.action-btn {
  background: #e94560;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.action-btn.small { padding: 6px 12px; font-size: 12px; }

/* ---------- Admin Specific ---------- */
.admin-tabs-container { overflow-x: auto; }
/* Fixed overflow for admin tabs – always scrollable */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

.admin-tab {
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: #aaa;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;  /* prevent shrinking */
}

.admin-tab.active,
.admin-tab:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}

#admin-badge {
  background: #e94560;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  display: none;
}

.list-container { display: flex; flex-direction: column; gap: 8px; }
.card {
  background: #1a1a35;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #2a2a4a;
}

/* ---------- Deposit / Withdraw Page Specific ---------- */
.amount-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.amount-btn {
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  flex: 1 1 auto;
  min-width: 60px;
  text-align: center;
}

.amount-btn.active,
.amount-btn:hover {
  background: #e94560;
  border-color: #e94560;
}

.custom-amount { margin-bottom: 16px; }
.qr-container { text-align: center; margin: 16px 0; }
.qr-image { width: 200px; height: 200px; object-fit: contain; border-radius: 12px; }
.upload-section { margin: 16px 0; }
.screenshot-preview { margin-top: 8px; }
.screenshot-thumb { width: 100px; height: auto; border-radius: 8px; }

.divider { display: flex; align-items: center; margin: 16px 0; color: #aaa; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #2a2a4a; }
.divider span { padding: 0 12px; }

.telegram-btn { background: #0088cc; border-color: #0088cc; color: white; }

.note { color: #888; font-size: 12px; text-align: center; margin-top: 8px; }
.section-sub { color: #aaa; font-size: 14px; margin-bottom: 8px; }

/* ---------- Transaction Cards ---------- */
.transaction-card {
  background: #1a1a35;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #2a2a4a;
}

.txn-top { display: flex; justify-content: space-between; align-items: center; }
.txn-amount { font-size: 18px; font-weight: bold; }
.txn-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.txn-bottom { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #aaa; }
.txn-note { font-size: 12px; color: #e94560; margin-top: 4px; }

/* ---------- Profile / Settings ---------- */
.profile-pic-settings { text-align: center; margin: 16px 0; }
.large-profile-pic { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #e94560; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a4a;
}

.profile-pic-wrapper { position: relative; }
.profile-pic { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid #e94560; }
.edit-pic-btn {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: #e94560;
  border: none;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 12px;
  cursor: pointer;
}

.profile-info h2 { font-size: 18px; color: white; }
.profile-info p { font-size: 14px; color: #aaa; margin: 4px 0; }
.edit-profile-btn { margin-top: 8px; color: #e94560; background: transparent; border: 1px solid #e94560; padding: 6px 12px; border-radius: 8px; cursor: pointer; }

.balance-cards { display: flex; gap: 12px; }
.balance-card {
  flex: 1;
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid #2a2a4a;
}

.balance-label { color: #aaa; font-size: 14px; }
.balance-amount { color: #e94560; font-size: 20px; font-weight: bold; }

.quick-actions { display: flex; gap: 8px; }
.quick-actions .action-btn { flex: 1; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-btn {
  background: #1e1e3a;
  border: 1px solid #2a2a4a;
  color: #aaa;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active,
.tab-btn:hover {
  background: #e94560;
  color: white;
  border-color: #e94560;
}

/* ---------- Team Hub / Invites ---------- */
.team-card {
  background: #1a1a35;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid #2a2a4a;
}

.invite-card {
  background: #1a1a35;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a1a35;
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.search-avatar { width: 36px; height: 36px; border-radius: 50%; }

.referral-box {
  background: #1a1a35;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  font-size: 14px;
  word-break: break-all;
}

/* ---------- Tournament Detail Page ---------- */
.tournament-detail-card {
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #2a2a4a;
}

.game-type-big { color: #e94560; font-size: 14px; text-transform: uppercase; }
.meta-info { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; font-size: 14px; }

.registered-badge {
  background: #1e1e3a;
  color: #4caf50;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
}

.participants-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.participant-avatar {
  width: 60px;
  text-align: center;
  font-size: 12px;
}

.participant-avatar img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.live-banner {
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 2px solid #e94560;
  animation: glowingBorder 2s infinite;
}

.live-banner h2 { color: #e94560; margin-bottom: 8px; }
.live-banner p { font-size: 18px; margin: 4px 0; }

.podium { display: flex; justify-content: center; gap: 12px; }
.podium-card {
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid #2a2a4a;
  flex: 1;
}

.medal { font-size: 32px; }

.bracket-tree { margin-top: 12px; }
.bracket-match {
  background: #1e1e3a;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 14px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  background: #0f0f25;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid #2a2a4a;
}

.modal-card h3 { margin-bottom: 12px; color: white; }

.error-msg { color: #e94560; font-weight: bold; }

/* ---------- Wallet / Transactions Redesigned ---------- */
.wallet-tabs {
  display: flex;
  background: #1a1a35;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 8px;
}

.wallet-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #aaa;
  padding: 10px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.wallet-tab.active {
  background: #e94560;
  color: white;
  font-weight: bold;
}

.wallet-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a35;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid #2a2a4a;
}

.wallet-card-left { flex: 1; }
.wallet-amount { font-size: 20px; font-weight: bold; }
.wallet-meta { font-size: 12px; color: #aaa; margin-top: 4px; }
.wallet-note { font-size: 12px; color: #e94560; margin-top: 4px; }
.wallet-card-right { text-align: right; }
.wallet-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  color: white;
  display: inline-block;
}
.wallet-proof {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 6px;
  cursor: pointer;
}

/* ---------- Completion Modal participant rows ---------- */
.participant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  background: #1a1a35;
  padding: 8px;
  border-radius: 8px;
}

.participant-row .kill-inp,
.participant-row .win-sel {
  flex: 1;
  min-width: 0;
}

/* ---------- Misc ---------- */
hr { border-color: #2a2a4a; margin: 16px 0; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #e94560; border-radius: 4px; }