/* ==========================================================================
   RNGdle RU - Cyber-Russian Neon Theme & Design System
   ========================================================================== */

:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 240, 255, 0.3);

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  --cyan: #00f0ff;
  --pink: #ff007f;
  --gold: #ffd700;
  --purple: #a855f7;
  --blue: #3b82f6;
  --mythic: #ff0055;
  --trash: #718096;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Montserrat', sans-serif;
}

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

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 600px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  position: relative;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.5px;
}

.logo-accent {
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.logo-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.user-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.streak-badge {
  border-color: rgba(255, 128, 0, 0.4);
  color: #ff9900;
}

.level-badge {
  color: var(--cyan);
  border-color: rgba(0, 240, 255, 0.3);
}

.ep-badge {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.3);
}

.dust-badge {
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.3);
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* Tabs */

.nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 2px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--cyan), #00a8ff);
  color: #0b0f19;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
  font-weight: 800;
}

/* ==========================================================================
   Main Gameplay Arena & Reels
   ========================================================================== */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tab-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hidden {
  display: none !important;
}

.game-mode-banner {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px;
}

.mode-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--gold);
}

.mode-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Slot Machine Drums */

.slot-machine-container {
  background: var(--bg-card);
  border: 2px solid var(--border-glow);
  border-radius: 20px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.slot-frame {
  width: 100%;
  background: #050811;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  position: relative;
}

.reels-wrapper {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.reel {
  flex: 1;
  height: 70px;
  background: linear-gradient(180deg, #131b2e 0%, #1e293b 50%, #131b2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.6);
}

.digit {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: transform 0.05s linear;
}

.slot-glass-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-radius: 16px;
  transition: background 0.3s;
}

/* Controls & Buttons */

.slot-controls {
  display: flex;
  gap: 10px;
  width: 100%;
}

.pulse-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--cyan), #0080ff);
  border: none;
  color: #050811;
  padding: 16px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.4);
  transition: all 0.2s;
}

.pulse-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.6);
}

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

.sec-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: white;
  padding: 16px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Result Card & Analysis
   ========================================================================== */

.result-card {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tier-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  font-family: var(--font-display);
}

.tier-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.percentile-pill {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-color);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
}

.number-display {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 4px;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.analysis-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.properties-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.property-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--cyan);
  padding: 8px 12px;
  border-radius: 6px;
}

.prop-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
}

.prop-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.result-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: white;
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.tg-btn {
  background: linear-gradient(135deg, #0088cc, #00a8ff);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

/* ==========================================================================
   Leaderboard UI
   ========================================================================== */

.leaderboard-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lb-subtab {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}

.lb-subtab.active {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 14px;
  transition: all 0.2s;
}

.lb-rank {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  width: 32px;
  color: var(--text-muted);
}

.lb-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-name {
  font-weight: 800;
  font-size: 13px;
  color: white;
}

.lb-badge-text {
  font-size: 11px;
  color: var(--text-muted);
}

.lb-score-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lb-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
}

.lb-ep {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
}

/* ==========================================================================
   Badges Grid
   ========================================================================== */

.pane-header {
  text-align: center;
  margin-bottom: 8px;
}

.pane-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold);
}

.pane-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn.active {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}

.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-card.unlocked {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.badge-icon {
  font-size: 32px;
  margin-bottom: 6px;
}

.badge-title {
  font-weight: 700;
  font-size: 12px;
  color: white;
}

.badge-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.2;
}

/* ==========================================================================
   Crafting Grid
   ========================================================================== */

.crafting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.craft-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.craft-icon {
  font-size: 36px;
}

.craft-name {
  font-weight: 700;
  font-size: 13px;
  color: white;
}

.craft-cost {
  font-size: 12px;
  color: var(--purple);
  font-weight: 800;
}

.craft-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.craft-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inventory-section {
  margin-top: 16px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.inventory-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inv-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty-inv {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* Particle Canvas & Toast */

.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--cyan);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  animation: fadeInOut 2.5s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Account Pill Button & Modal Styling */

.account-pill-btn {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-pill-btn:hover {
  background: var(--cyan);
  color: #0b0f19;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 16px;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: white;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.close-modal-btn:hover {
  color: white;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-status {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--cyan);
  line-height: 1.4;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.form-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.future-auth-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  padding: 12px;
  border-radius: 12px;
  margin-top: 6px;
}

.future-auth-title {
  font-size: 12px;
  font-weight: 800;
  color: #a855f7;
}

.future-auth-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Profile Level XP & Level Rewards Roadmap Styling */

.profile-level-card {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--cyan);
  padding: 14px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-title {
  font-size: 14px;
  font-weight: 800;
  color: white;
}

.profile-xp-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}

.xp-progress-track {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.xp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 6px;
  transition: width 0.4s ease;
}

.level-rewards-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 800;
  color: white;
}

.level-rewards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.level-reward-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.level-reward-card.unlocked {
  background: rgba(0, 240, 255, 0.08);
  border-color: var(--cyan);
}

.level-reward-card.claimed {
  opacity: 0.6;
}

.reward-icon {
  font-size: 22px;
}

.reward-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.reward-name {
  font-size: 12px;
  font-weight: 800;
  color: white;
}

.reward-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.claim-reward-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.claim-reward-btn.pulse-reward {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #0b0f19;
  border: none;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
  animation: pulseBtn 1.5s infinite;
}

.claim-reward-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.danger-btn {
  background: rgba(255, 0, 85, 0.15);
  border: 1px solid var(--mythic);
  color: var(--mythic);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: var(--mythic);
  color: white;
}




.reel-spin-blur { filter: blur(3px); transform: scaleY(1.1); transition: filter 0.1s ease, transform 0.1s ease; }


.prop-digits { display: flex; gap: 4px; margin-top: 8px; }
.prop-digit-box { width: 20px; height: 24px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.1); border-radius: 4px; font-family: var(--font-display); font-size: 14px; background: rgba(0,0,0,0.3); }

