/* ============================================
   CSS Variables (для совместимости со старыми стилями игр)
   ============================================ */

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --info: #06b6d4;
  --bg-dark: #0a0a0f;
  --bg-darker: #020617;
  --card-bg: #1a1a24;
  --card-bg-hover: #22222e;
  --glass-bg: rgba(26, 26, 36, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --nav-height: 70px;
  --safe-area-bottom: 60px;
  --safe-area-top: env(safe-area-inset-top);
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-lg: 20px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ============================================
   Floating Balance Pill (overlay)
   ============================================ */

.floating-balance {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  right: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(251, 191, 36, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
}

.floating-balance:hover {
  transform: scale(1.05);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(251, 191, 36, 0.25);
}

.floating-balance svg {
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.floating-balance span {
  font-weight: 700;
  font-size: 14px;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* ============================================
   Screen Header (unified)
   ============================================ */

.screen-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(15, 15, 25, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.screen-header svg {
  color: #fbbf24;
  flex-shrink: 0;
}

.screen-header span {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

/* ============================================
   Safe Bottom Padding (navbar + safe-area)
   ============================================ */

.pb-24 {
  padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
}

/* ============================================
   Global Input & Form Styles
   ============================================ */

input[type="text"],
input[type="number"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
textarea,
select {
  background: rgba(15, 15, 25, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 14px;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* Only add padding if not already sized */
input:not([class*="h-"]):not([class*="pl-"]),
textarea:not([class*="p-"]),
select:not([class*="h-"]) {
  padding: 10px 12px;
}

/* Small number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  text-align: center;
  min-width: 50px;
}

/* Small compact inputs */
input.compact,
input[style*="width"] {
  padding: 8px 6px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  min-width: 40px;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 0 15px rgba(99, 102, 241, 0.1) !important;
  background: rgba(20, 20, 35, 0.95) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.6) !important;
}

/* Better text contrast */
.text-muted,
.text-secondary {
  color: #94a3b8 !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.6) !important;
}

small,
.small {
  color: #94a3b8;
}

label {
  color: #cbd5e1;
  font-weight: 500;
}

/* ============================================
   Top Bar
   ============================================ */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0.8) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   Bottom Navigation - Gift X Style
   ============================================ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 70px;
  background: linear-gradient(180deg, rgba(15, 15, 25, 0.98) 0%, rgba(10, 10, 20, 1) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 0;
}

.bottom-nav .nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: transparent;
}

.bottom-nav .nav-item .nav-icon svg {
  width: 20px;
  height: 20px;
}

.bottom-nav .nav-item .nav-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.bottom-nav .nav-item:hover .nav-icon {
  color: rgba(255, 255, 255, 0.8);
}

.bottom-nav .nav-item:hover .nav-label {
  color: rgba(255, 255, 255, 0.8);
}

/* Active state with bubble */
.bottom-nav .nav-item.active {
  transform: translateY(-2px);
}

.bottom-nav .nav-item.active .nav-icon {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  box-shadow: 
    0 4px 12px rgba(99, 102, 241, 0.5),
    0 0 20px rgba(99, 102, 241, 0.3);
}

.bottom-nav .nav-item.active .nav-label {
  color: var(--primary);
  font-weight: 700;
}

.bottom-nav .nav-indicator {
  display: none;
}

/* ============================================
   Game Container & Overlay
   ============================================ */

.game-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 20px;
  padding-bottom: calc(12px + var(--safe-area-bottom));
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

#race-overlay {
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: none;
}

.overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.overlay-content {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.overlay-status {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.status-icon {
  display: inline-flex;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   Race Game Styles
   ============================================ */

.race-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: blur(8px);
  transform: scale(1.1);
}

#raceCanvas {
  position: relative;
  z-index: 1;
  max-width: 75%;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

/* Canvas wrapper centering */
#race-screen .game-container > center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.race-participants-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 8px auto;
  padding: 4px;
  flex-shrink: 0;
}

.race-participant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(26, 26, 36, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.1s ease;
}

.race-participant-item.me {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.race-participant-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.race-participant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.2);
}

.race-participant-item.me .race-participant-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
}

.race-participant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.race-participant-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.race-participant-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.race-participant-count i {
  font-size: 12px;
  color: var(--text-secondary);
}

.race-participants-list::-webkit-scrollbar {
  width: 4px;
}

.race-participants-list::-webkit-scrollbar-track {
  background: transparent;
}

.race-participants-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* Camera Toggle */
.camera-toggle {
  position: relative;
  z-index: 100;
  pointer-events: auto;
  margin-left: auto;
}

.camera-toggle-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.camera-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.camera-label[data-mode="leader"] {
  color: var(--warning);
}

.camera-label[data-mode="me"].active {
  color: var(--primary);
}

.camera-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.camera-switch-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.camera-switch-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--warning), #f97316);
  border-radius: 24px;
  transition: all 0.3s ease;
}

.camera-switch-label::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.camera-switch-input:checked + .camera-switch-label {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
}

.camera-switch-input:checked + .camera-switch-label::before {
  transform: translateX(20px);
}

/* ============================================
   Wheel Game Styles
   ============================================ */

.wheel-content {
  padding-bottom: calc(20px + var(--safe-area-bottom));
}

.wheel-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  position: relative;
}

.wheel-container {
  position: relative;
  width: 300px;
  height: 300px;
}

#wheelCanvas {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.4));
}

.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid var(--warning);
  z-index: 10;
  filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.5));
}

.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, #1a1a2e 0%, #0a0a15 100%);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  z-index: 5;
}

.wheel-center:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    0 4px 25px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(99, 102, 241, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.wheel-center-gift {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-center-gift img,
.wheel-center-gift lottie-player {
  width: 85px;
  height: 85px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.wheel-center:hover .wheel-center-gift img,
.wheel-center:hover .wheel-center-gift lottie-player {
  transform: scale(1.08);
}

.wheel-center-pattern {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
}

.wheel-center-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.wheel-timer {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Wheel Corner Info Boxes */
.wheel-corner-box {
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(26, 26, 36, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  min-width: 60px;
  z-index: 10;
}

.wheel-corner-left {
  left: 8px;
}

.wheel-corner-right {
  right: 8px;
}

.wheel-corner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 8px;
  color: white;
}

.wheel-corner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.wheel-corner-label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wheel-corner-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.wheel-status-message {
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.wheel-prizes-container {
  margin-top: 8px;
}

.wheel-bet-controls {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 0 4px;
  margin-top: 16px;
}

.ticket-selector {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.ticket-btn {
  width: 50px;
  height: 100%;
  min-height: 56px;
  border: none;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-btn:hover {
  background: var(--card-bg-hover);
}

.ticket-btn:active {
  background: var(--primary);
}

.ticket-btn.minus {
  border-right: 1px solid var(--glass-border);
}

.ticket-btn.plus {
  border-left: 1px solid var(--glass-border);
}

.ticket-amount {
  min-width: 50px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

input.ticket-amount {
  background: transparent;
  border: none;
  outline: none;
  width: 60px;
  padding: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

input.ticket-amount::-webkit-outer-spin-button,
input.ticket-amount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ============================================
   Gift Road Game Styles
   ============================================ */

.giftroad-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  padding-bottom: calc(100px + var(--safe-area-bottom));
  overflow-y: auto;
}

.giftroad-game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  position: relative;
}

.giftroad-road {
  width: 100%;
  max-width: 400px;
  height: 160px;
  background: linear-gradient(90deg, #1a1a24 0%, #0a0a0f 100%);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 3px solid #2a2a38;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.giftroad-lanes {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: row;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.giftroad-lane {
  flex: 1;
  border-right: 2px dashed rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.giftroad-lane:last-child {
  border-right: none;
}

.giftroad-lane-marker {
  position: absolute;
  bottom: 10px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 4px;
  border-radius: 6px;
  width: max-content;
}

.giftroad-lane.current {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
}

.giftroad-lane.passed {
  background: rgba(16, 185, 129, 0.08);
}

.giftroad-gift {
  position: absolute;
  width: 40px;
  height: 40px;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.giftroad-gift img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.giftroad-gift.moving {
  animation: giftBounce 0.5s ease;
}

@keyframes giftBounce {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-80%) scale(1.1); }
}

.giftroad-gift.hit {
  animation: giftHit 0.6s ease forwards;
}

@keyframes giftHit {
  0% { transform: translateY(-50%) scale(1) rotate(0deg); }
  25% { transform: translateY(-30%) scale(1.2) rotate(15deg); }
  50% { transform: translateY(100%) scale(0.8) rotate(-45deg); opacity: 1; }
  100% { transform: translateY(200%) scale(0.5) rotate(-90deg); opacity: 0; }
}

.giftroad-barrier {
  position: absolute;
  width: 60%;
  height: 8px;
  top: 20%;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  opacity: 0;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 20;
  border-radius: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.giftroad-barrier.show {
  opacity: 1;
  transform: translateX(-50%) scaleX(0.16);
}

.giftroad-car {
  position: absolute;
  width: 80px;
  height: 40px;
  top: -100px;
  z-index: 15;
  opacity: 0;
  transition: none;
  transform: translateX(-50%) rotate(90deg);
}

.giftroad-car img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.giftroad-car.driving {
  opacity: 1;
  animation: carDrive 0.6s ease-in forwards;
}

@keyframes carDrive {
  0% { top: -100px; }
  40% { top: 30%; }
  100% { top: 150%; }
}

.giftroad-multiplier-display {
  margin-top: 16px;
  text-align: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.1));
  border: 2px solid var(--success);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.multiplier-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.multiplier-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.multiplier-value.danger {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.multiplier-value.pulse {
  animation: multiplierPulse 0.5s ease;
}

@keyframes multiplierPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.giftroad-steps {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.giftroad-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--card-bg);
  border: 2px solid var(--glass-border);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.giftroad-step.passed {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.giftroad-step.current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 0 10px var(--primary-glow);
}

.giftroad-step.failed {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.giftroad-controls {
  margin-top: 16px;
}

.giftroad-play-controls {
  padding: 4px;
}

.giftroad-gameover-controls {
  text-align: center;
}

.gameover-message {
  padding: 20px;
  border-radius: var(--border-radius);
  margin-bottom: 8px;
}

.gameover-message.win {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  border: 2px solid var(--success);
}

.gameover-message.lose {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  border: 2px solid var(--danger);
}

.gameover-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.gameover-message.win .gameover-title {
  color: var(--success);
}

.gameover-message.lose .gameover-title {
  color: var(--danger);
}

.gameover-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--warning);
}

.gameover-details {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

.giftroad-lose-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(239, 68, 68, 0);
  pointer-events: none;
  z-index: 1000;
  transition: background 0.1s ease;
}

.giftroad-lose-overlay.flash {
  animation: redFlash 0.6s ease;
}

@keyframes redFlash {
  0% { background: rgba(239, 68, 68, 0); }
  20% { background: rgba(239, 68, 68, 0.6); }
  40% { background: rgba(239, 68, 68, 0.2); }
  60% { background: rgba(239, 68, 68, 0.4); }
  80% { background: rgba(239, 68, 68, 0.1); }
  100% { background: rgba(239, 68, 68, 0); }
}

.giftroad-controls .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Wallet Connect Banner
   ============================================ */

.wallet-connect-banner {
  background: rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.3);
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}

/* ============================================
   Market Styles
   ============================================ */

.market-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .market-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.market-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.95) 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.2);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.market-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: radial-gradient(ellipse at 50% 0%, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.market-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(6, 182, 212, 0.2);
}

.market-card-image-wrapper {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.market-card-image {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.market-card:hover .market-card-image {
  transform: scale(1.1) rotate(3deg);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

.market-card-content {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.market-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-card-series {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.market-floor {
  margin-top: auto;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.market-card-id-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.market-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #6366f1 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.market-card-btn:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(6, 182, 212, 0.4),
    0 0 20px rgba(6, 182, 212, 0.2);
}

.market-card-btn:active {
  transform: scale(0.98);
}

.market-models-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 500px) {
  .market-models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.market-model-card {
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9), rgba(20, 20, 35, 0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.market-model-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.15);
}

.market-model-image {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto 8px auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.market-model-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.market-model-name {
  font-weight: 700;
  font-size: 14px;
  color: #f8fafc;
  margin-bottom: 4px;
  line-height: 1.3;
}

.market-model-floor {
  font-size: 12px;
  font-weight: 600;
  color: #22d3ee;
}

/* ============================================
   Wheel Prize Items
   ============================================ */

.wheel-prize-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(30, 30, 50, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  margin-bottom: 8px;
}

.wheel-prize-medal {
  font-size: 20px;
  flex-shrink: 0;
}

.wheel-prize-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Lottie player in prize list */
.wheel-prize-item lottie-player.wheel-prize-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.wheel-prize-img.clickable {
  cursor: pointer;
  border: 2px solid rgba(251, 191, 36, 0.3);
}

.wheel-prize-img.clickable:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.wheel-prize-img.clickable:active {
  transform: scale(0.95);
}

.wheel-prize-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.wheel-prize-name {
  font-weight: 700;
  font-size: 14px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wheel-prize-rank {
  font-size: 11px;
  color: #94a3b8;
}

.wheel-prize-pot {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  color: #fbbf24;
  flex-shrink: 0;
}

.wheel-pot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  margin-bottom: 12px;
}

.wheel-pot-label {
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}

.wheel-pot-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.market-details-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--border-radius);
  background: var(--bg-dark);
  padding: 10px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  min-height: 50vh;
  position: relative;
}

.empty-state::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.empty-state-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  border: 2px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--primary);
  animation: float 3s ease-in-out infinite;
  box-shadow: 
    0 0 40px rgba(99, 102, 241, 0.3),
    inset 0 0 30px rgba(99, 102, 241, 0.1);
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.empty-state-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.empty-state-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 280px;
  position: relative;
  z-index: 1;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #06b6d4 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 14px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.empty-state-btn:hover {
  background-position: 100% 0;
  transform: translateY(-3px);
  box-shadow: 
    0 8px 30px rgba(99, 102, 241, 0.5),
    0 0 40px rgba(99, 102, 241, 0.3);
}

/* ============================================
   Gifts Grid
   ============================================ */

.gifts-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

/* ============================================
   Gift Cards - Gift X Style with Glow Effects
   ============================================ */

.gift-card {
  position: relative;
  background: linear-gradient(145deg, rgba(30, 30, 50, 0.9) 0%, rgba(20, 20, 35, 0.95) 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: cardAppear 0.5s ease-out;
  animation-fill-mode: both;
}

.gift-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gift-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(99, 102, 241, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.gift-card-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  z-index: 1;
}

.gift-card-image {
  width: 90px;
  min-height: 90px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(6, 182, 212, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.gift-card-image::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg 340deg, rgba(255, 255, 255, 0.1) 360deg);
  animation: shimmer 4s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gift-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s ease;
  position: relative;
  z-index: 1;
}

.gift-card:hover .gift-card-image img {
  transform: scale(1.1) rotate(3deg);
}

/* Lottie player in gift cards */
.gift-card-image lottie-player {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
  transition: transform 0.4s ease;
}

.gift-card:hover .gift-card-image lottie-player {
  transform: scale(1.1) rotate(3deg);
}

/* Fallback image hidden by default when lottie is present */
.gift-card-image .gift-fallback-img {
  display: none;
}

.gift-card-image.clickable {
  cursor: pointer;
}

.gift-card-image.clickable::before {
  content: '👁';
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s;
}

.gift-card-image.clickable:hover::before {
  opacity: 1;
}

.gift-live-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5);
  animation: liveGlow 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes liveGlow {
  0%, 100% { box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 2px 20px rgba(239, 68, 68, 0.8); }
}

.gift-live-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: livePulse 1s infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.gift-card-content {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.gift-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.gift-card-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-card-type {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gift-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.gift-card-price {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.gift-card-price svg {
  color: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.gift-card-time {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 6px;
}

.gift-card-prizes {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  cursor: pointer;
  padding: 4px 8px;
  background: rgba(251, 191, 36, 0.15);
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.gift-card-prizes:hover {
  background: rgba(251, 191, 36, 0.25);
  border-color: rgba(251, 191, 36, 0.4);
  transform: scale(1.05);
}

.gift-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #06b6d4 100%);
  background-size: 200% 100%;
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.gift-card-btn:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(99, 102, 241, 0.5),
    0 0 30px rgba(99, 102, 241, 0.3);
}

.gift-card-btn:active {
  transform: scale(0.98);
}

.gift-card-btn.live {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #f97316 100%);
  background-size: 200% 100%;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.gift-card-btn.live:hover {
  box-shadow: 
    0 6px 20px rgba(239, 68, 68, 0.5),
    0 0 30px rgba(239, 68, 68, 0.3);
}

/* ============================================
   Inventory Items
   ============================================ */

.inventory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-dark);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
  transition: var(--transition-normal);
}

.inventory-item:hover {
  background: var(--card-bg-hover);
  border-color: var(--primary);
}

.inventory-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.inventory-item-info {
  flex: 1;
  min-width: 0;
}

.inventory-item-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.inventory-item-date {
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.inventory-item-link {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.inventory-item-link:hover {
  background: var(--primary-hover);
  color: white;
  transform: translateY(-2px);
}

/* ============================================
   Bootstrap Modal Overrides - Premium Design
   ============================================ */

.modal-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop.show {
  opacity: 0.85;
  background: linear-gradient(135deg, rgba(10, 10, 15, 0.95), rgba(20, 20, 30, 0.9));
}

.modal-dialog {
  margin: 1rem;
}

.modal-content {
  background: linear-gradient(180deg, rgba(26, 26, 36, 0.98) 0%, rgba(18, 18, 26, 0.99) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 20px 24px !important;
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-weight: 700 !important;
  font-size: 18px !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  padding: 24px !important;
}

.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  padding: 16px 24px !important;
  background: rgba(0, 0, 0, 0.2);
}

.btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-close-white:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* List group items in modals */
.list-group-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  margin-bottom: 8px;
  padding: 14px 16px !important;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background: rgba(99, 102, 241, 0.1) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  transform: translateX(4px);
}

.list-group-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15)) !important;
  border-color: var(--primary) !important;
}

.list-group-flush > .list-group-item {
  border-radius: 0 !important;
  margin-bottom: 0;
  border-left: none !important;
  border-right: none !important;
}

/* Form controls in modals */
.form-control,
.form-select {
  background: rgba(10, 10, 15, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  transition: all 0.2s ease !important;
}

.form-control:focus,
.form-select:focus {
  background: rgba(10, 10, 15, 0.9) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.1) !important;
  color: var(--text-primary) !important;
}

.form-control::placeholder {
  color: rgba(148, 163, 184, 0.5) !important;
}

.form-check-input {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  width: 20px !important;
  height: 20px !important;
}

.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

/* Radio buttons styled */
.form-check-input[type="radio"] {
  border-radius: 50% !important;
}

/* Labels */
.form-label {
  color: rgba(148, 163, 184, 0.8);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Nav pills override */
.nav-pills .nav-link {
  color: var(--text-muted) !important;
  background: transparent !important;
  border-radius: 10px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

.nav-pills .nav-link.active {
  color: white !important;
  background: linear-gradient(135deg, var(--primary), #8b5cf6) !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Modal animations */
.modal.fade .modal-dialog {
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Glass effect for info blocks in modals */
.modal .glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

/* Alert styles in modals */
.modal .alert {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  color: #fbbf24;
}

/* Button styles in modals */
.modal .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px 20px;
  transition: all 0.2s ease;
}

.modal .btn:hover {
  transform: translateY(-2px);
}

.modal .btn:active {
  transform: scale(0.98);
}

.modal .btn-primary {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.modal .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.modal .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.modal .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #0a0a0f;
}

.modal .btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none;
}

.modal .btn-outline-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.modal .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.modal .btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.modal .btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

.modal .btn-outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.modal .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 380px) {
  .giftroad-road {
    height: 140px;
  }
  
  .giftroad-gift {
    width: 36px;
    height: 36px;
  }
  
  .multiplier-value {
    font-size: 26px;
  }
  
  .giftroad-step {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  
  .gift-join-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .bottom-nav .nav-item {
    padding: 8px 16px;
  }
}

/* ============================================
   Airplane/Aviamasters Game Screen
   ============================================ */

#airplane-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  background: #000;
  padding-bottom: calc(var(--nav-height, 70px) + env(safe-area-inset-bottom, 0px));
}

#airplane-screen.active {
  display: flex !important;
}

#airplane-game-container {
  flex: 1;
  position: relative;
}

#aviamasters-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

#aviamasters-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 10;
}

/* ============================================
   Daily Case FAB
   ============================================ */

.daily-case-fab {
  position: fixed;
  right: 20px;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #7c3aed 100%);
  color: white;
  box-shadow:
    0 4px 16px rgba(99, 102, 241, 0.45),
    0 8px 32px rgba(139, 92, 246, 0.3),
    0 0 0 3px rgba(99, 102, 241, 0.15);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.daily-case-fab:active {
  transform: scale(0.92) !important;
}

/* Entrance: slide-bounce up from behind navbar */
@keyframes fabEnter {
  0% {
    opacity: 0;
    transform: translateY(80px) scale(0.6);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.05);
  }
  80% {
    transform: translateY(3px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Idle float after entrance */
@keyframes fabFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.daily-case-fab.fab-visible {
  display: flex !important;
  animation: fabEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             fabFloat 2.5s ease-in-out 0.6s infinite;
}

/* Withdraw currency selector */
.withdraw-currency-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  cursor: pointer;
}
.withdraw-currency-btn:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
.withdraw-currency-btn.active[data-currency="TON"] {
  background: rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.5);
  color: #60a5fa;
}
.withdraw-currency-btn.active[data-currency="STARS"] {
  background: rgba(245,158,11,0.2);
  border-color: rgba(245,158,11,0.5);
  color: #fbbf24;
}
