/* assets/css/main.css */
:root {
  --bg-primary: #0f1523;
  --bg-header: #151b29;
  --bg-card: #182136;
  --bg-card-secondary: #222b40;
  --accent-gold: #ffcb36;
  --accent-gold-dark: #e5b630;
  --accent-green: #2ecc71;
  --accent-red: #ff4d4f;
  --text-white: #ffffff;
  --text-muted: #8e95ae;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body.light-theme {
  --bg-primary: #f0f2f5;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-secondary: #e4e6eb;
  --text-white: #1c1e21;
  --text-muted: #65676b;
}

body.light-theme .top-header {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

body.light-theme .wallet-card {
  background: rgba(216, 184, 76, 0.12);
  border-color: rgba(216, 184, 76, 0.25);
}

body.light-theme .icon-btn {
  background: var(--bg-card-secondary);
  color: var(--text-white);
}

body.light-theme .avatar-btn {
  background: var(--accent-gold);
  color: #000;
}

body.light-theme .bottom-nav {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0,0,0,0.08);
}

body.light-theme .sidebar-menu {
  background: var(--bg-header);
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

body.light-theme .sidebar-overlay {
  background: rgba(0,0,0,0.3);
}

body.light-theme .sidebar-menu a {
  color: var(--text-white);
}

body.light-theme .sidebar-menu a:hover {
  background: var(--bg-card-secondary);
}

body.light-theme .sidebar-menu a i {
  color: var(--text-muted);
}

body.light-theme .sidebar-menu .badge {
  background: var(--accent-gold);
  color: #000;
}

body.light-theme .form-control {
  background: var(--bg-card);
  border-color: rgba(0,0,0,0.12);
  color: var(--text-white);
}

body.light-theme .form-control:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(216, 184, 76, 0.15);
}

body.light-theme .game-card {
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.light-theme .game-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.12);
}

body.light-theme .game-card-media {
  background: rgba(0,0,0,0.02);
}

body.light-theme .game-card-badge,
body.light-theme .game-card-live {
  background: rgba(0,0,0,0.55);
}

body.light-theme .game-card-won {
  background: rgba(46, 204, 113, 0.9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.2);
}

body.light-theme .toast {
  background: var(--bg-card);
  color: var(--text-white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

body.light-theme .auth-wrapper {
  background: var(--bg-primary);
}

body.light-theme .banner-slider .slider-dot {
  background: rgba(0,0,0,0.2);
}

body.light-theme .banner-slider .slider-dot.active {
  background: var(--accent-gold);
}

body.light-theme .category-tabs a:not([style*="accent-gold"]) {
  background: var(--bg-card);
  color: var(--text-muted);
  border-color: rgba(0,0,0,0.06);
}

body.light-theme table th {
  color: var(--text-muted);
}

body.light-theme table td {
  border-color: rgba(0,0,0,0.06);
}

body.light-theme .badge {
  background: rgba(0,0,0,0.06);
}

body.light-theme .badge-success {
  background: rgba(40,199,111,0.12);
  color: #1a8a4a;
}

body.light-theme .badge-danger {
  background: rgba(255,77,79,0.12);
  color: #cc3333;
}

body.light-theme .badge-warning {
  background: rgba(216,184,76,0.15);
  color: #b8960a;
}

@media (min-width: 768px) {
  .desktop-nav { display: flex; }
  .bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; padding-top: 110px !important; }
  .floating-support { right: 20px !important; bottom: 20px !important; }
  .top-header ~ .container { padding-top: 0 !important; }
}

@media (min-width: 900px) {
  body {
    padding-left: 300px !important;
    padding-top: 110px !important;
  }

  .top-header {
    left: 300px;
    width: calc(100% - 300px);
  }

  .desktop-nav {
    left: 300px;
    width: calc(100% - 300px);
  }

  .menu-toggle-btn {
    display: none;
  }

  .sidebar-menu {
    left: 0 !important;
    width: 300px;
    box-shadow: none;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

@media (max-width: 767px) {
  body { padding-bottom: 70px; }
}

.card-grad-1 { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important; }
.card-grad-2 { background: linear-gradient(135deg, #512788 0%, #a242c7 100%) !important; }
.card-grad-3 { background: linear-gradient(135deg, #a80a82 0%, #d83bb3 100%) !important; }
.card-grad-4 { background: linear-gradient(135deg, #0e823f 0%, #17c762 100%) !important; }
.card-grad-5 { background: linear-gradient(135deg, #995c00 0%, #db8c00 100%) !important; }
.card-grad-6 { background: linear-gradient(135deg, #161e38 0%, #2b3b6b 100%) !important; }

/* Winning pop animation */
@keyframes winPop {
  0% { transform: translateY(20px) scale(0.9); opacity: 0; }
  20% { transform: translateY(0) scale(1.1); opacity: 1; }
  80% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-20px) scale(0.9); opacity: 0; }
}
.win-pop-item {
  animation: winPop 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  position: absolute;
  width: 100%;
}

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

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-white);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Sidebar Menu */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 1040;
  transition: background 0.3s;
  backdrop-filter: blur(2px);
}
.sidebar-menu {
  position: fixed;
  top: 0; left: -300px; width: 300px; height: 100%;
  background-color: var(--bg-header);
  z-index: 1050;
  transition: left 0.3s ease, background-color 0.3s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
}
.sidebar-menu.active {
  left: 0;
}
.sidebar-menu a {
  padding: 14px 16px;
  color: var(--text-white);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 15px;
  border-radius: 10px;
  margin: 2px 0;
  font-size: 14px;
  transition: background 0.2s, color 0.3s;
}
.sidebar-menu a:hover {
  background: var(--bg-card);
}
.sidebar-menu a i {
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Header */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  background-color: var(--bg-header);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.menu-toggle-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu-toggle-btn:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.menu-toggle-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text-white);
}

body.light-theme .menu-toggle-btn {
  border-color: rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.02);
}

body.light-theme .menu-toggle-btn span {
  background: var(--text-white);
}

/* Use general sibling so padding applies even when elements (e.g. canvas) appear between header and container */
.top-header ~ .container {
  padding-top: calc(60px + env(safe-area-inset-top, 0px));
}

/* Make the particles canvas non-layout and fixed behind the UI so it doesn't create vertical gap */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-left img {
  height: 24px;
}
.header-left .brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-card {
  background-color: rgba(216, 184, 76, 0.1);
  border: 1px solid rgba(216, 184, 76, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-gold);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.icon-btn {
  background: var(--bg-card-secondary);
  border: none;
  color: var(--text-white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-red);
}

.avatar-btn {
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-weight: 700;
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  background: var(--bg-header);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 0 16px;
  z-index: 99;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  transition: background 0.3s, border-color 0.3s;
}
.desktop-nav::-webkit-scrollbar { display: none; }
.desktop-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.3s, border-color 0.3s;
  border-bottom: 2px solid transparent;
}
.desktop-nav-item.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.desktop-nav-item:hover {
  color: var(--text-white);
}
body.light-theme .desktop-nav {
  background: var(--bg-header);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.light-theme .desktop-nav-item:hover {
  color: var(--text-white);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(16, 21, 34, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 100;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: background 0.3s, border-color 0.3s;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  transition: color 0.3s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-item.active {
  color: var(--accent-gold);
}

.nav-item i {
  font-size: 20px;
}

/* Mobile Sidebar Menu (matches image design) */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1060;
  animation: overlayFadeIn 0.3s ease;
  backdrop-filter: blur(3px);
}

.mobile-sidebar-overlay.active {
  display: block;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(3px);
  }
}

.mobile-sidebar-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100%;
  background: #1a2332;
  z-index: 1070;
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
  -webkit-overflow-scrolling: touch;
}

.mobile-sidebar-menu.active {
  left: 0;
  animation: slideInMenu 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInMenu {
  from {
    left: -100%;
    opacity: 0;
  }
  to {
    left: 0;
    opacity: 1;
  }
}

/* Mobile Sidebar Header */
.mobile-sidebar-header {
  background: linear-gradient(135deg, #151d2b 0%, #1a2332 100%);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.mobile-sidebar-balance {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.mobile-sidebar-balance:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.balance-amount {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.balance-currency {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.mobile-sidebar-notifications {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 18px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-sidebar-notifications:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-gold);
}

.mobile-sidebar-notifications::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 10px;
  height: 10px;
  background: var(--accent-red);
  border-radius: 50%;
  border: 2px solid #1a2332;
  animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 77, 79, 0.3);
  }
}

.mobile-sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8b84c 0%, #e5c95a 100%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(216, 184, 76, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Free Money Banner */
.mobile-free-money-banner {
  background: linear-gradient(135deg, #d8b84c 0%, #e5c95a 100%);
  margin: 16px;
  padding: 16px;
  border-radius: 12px;
  text-decoration: none;
  display: block;
  box-shadow: 0 6px 20px rgba(216, 184, 76, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-free-money-banner:active {
  transform: scale(0.98);
  box-shadow: 0 3px 10px rgba(216, 184, 76, 0.25);
}

.free-money-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.free-money-title {
  font-size: 16px;
  font-weight: 800;
  color: #000;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.free-money-title i {
  font-size: 14px;
  animation: gemShine 1.5s ease-in-out infinite;
}

@keyframes gemShine {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.free-money-subtitle {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.75);
  font-weight: 500;
}

/* Mobile Sidebar Items */
.mobile-sidebar-items {
  padding: 8px 12px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  color: #b8bcc8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mobile-sidebar-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.mobile-sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding-left: 16px;
}

.mobile-sidebar-item:hover::before {
  transform: scaleY(1);
}

.mobile-sidebar-item:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.98);
}

.mobile-sidebar-item i {
  width: 20px;
  text-align: center;
  font-size: 18px;
  color: #8e95ae;
  transition: color 0.25s ease;
}

.mobile-sidebar-item:hover i {
  color: var(--accent-gold);
}

.mobile-item-badge {
  margin-left: auto;
  background: var(--accent-gold);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 203, 54, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255, 203, 54, 0.2);
  }
}

/* Mobile Sidebar Footer */
.mobile-sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.mobile-support-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-support-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.mobile-support-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-support-btn:hover::before {
  left: 100%;
}

.mobile-support-btn:active {
  transform: scale(0.98);
}

.mobile-support-btn i {
  color: var(--accent-gold);
  font-size: 18px;
  transition: color 0.3s ease;
}

.mobile-support-btn:hover i {
  color: #ffd700;
}

.support-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent-green) 0%, #1abc9c 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

body.light-theme .mobile-sidebar-menu {
  background: #f5f5f5;
}

body.light-theme .mobile-sidebar-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-sidebar-balance {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .balance-amount {
  color: #1c1e21;
}

body.light-theme .balance-currency {
  color: #65676b;
}

body.light-theme .mobile-sidebar-notifications {
  background: rgba(0, 0, 0, 0.04);
  color: #65676b;
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-sidebar-notifications:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--accent-gold);
}

body.light-theme .mobile-free-money-banner {
  box-shadow: 0 6px 20px rgba(216, 184, 76, 0.25);
}

body.light-theme .mobile-sidebar-item {
  color: #65676b;
}

body.light-theme .mobile-sidebar-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1c1e21;
}

body.light-theme .mobile-sidebar-item i {
  color: #8e95ae;
}

body.light-theme .mobile-sidebar-item:hover i {
  color: var(--accent-gold);
}

body.light-theme .mobile-sidebar-footer {
  background: rgba(0, 0, 0, 0.02);
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .mobile-support-btn {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.01) 100%);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1c1e21;
}

body.light-theme .mobile-support-btn:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 100%);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-sidebar-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Hide mobile sidebar on desktop */
@media (min-width: 768px) {
  .mobile-sidebar-overlay,
  .mobile-sidebar-menu {
    display: none !important;
  }
}

/* Scrollbar styling for mobile sidebar */
.mobile-sidebar-items::-webkit-scrollbar {
  width: 4px;
}

.mobile-sidebar-items::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-sidebar-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.mobile-sidebar-items::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Container */
.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.game-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .game-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.game-card {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.3s;
  min-height: 100%;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.game-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(255,255,255,0.03);
}

.game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.game-card-title,
.game-card-provider,
.card-footer,
.game-name {
  display: none !important;
}

/* Ensure game image fills the card and no text is shown by default */
.game-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  aspect-ratio: 3 / 4;
}

.game-card-media {
  padding: 0;
}

.game-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.game-card-badge,
.game-card-live,
.game-card-won {
  position: absolute;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.45);
  color: #fff;
}

.game-card-badge { top: 10px; left: 10px; }
.game-card-live { top: 10px; right: 10px; }
.game-card-won {
  bottom: 10px;
  left: 10px;
  background: rgba(46, 204, 113, 0.9);
  color: #fff;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
  animation: wonPulse 2s ease-in-out infinite;
  transition: transform 0.3s;
}

.game-card:hover .game-card-won {
  transform: scale(1.05);
}

@keyframes wonPulse {
  0%, 100% { 
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    opacity: 1;
  }
  50% { 
    box-shadow: 0 2px 16px rgba(46, 204, 113, 0.6);
    opacity: 0.9;
  }
}

/* Live Win Bar - Professional Casino Style */
.game-card-live-win {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(90deg, rgba(30, 70, 32, 0.95) 0%, rgba(46, 204, 113, 0.95) 50%, rgba(30, 70, 32, 0.95) 100%);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  animation: winBarGlow 2.5s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card-live-win .live-win-icon {
  font-size: 13px;
  animation: fireFlicker 0.6s ease-in-out infinite;
  display: inline-block;
}

.game-card-live-win .live-win-amount {
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #ffffff;
}

.game-card-live-win .live-win-name {
  font-size: 10px;
  opacity: 0.85;
  font-weight: 600;
  margin-left: 2px;
}

/* Fire flicker animation for icon */
@keyframes fireFlicker {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Glow pulse animation */
@keyframes winBarGlow {
  0%, 100% {
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 6px 24px rgba(46, 204, 113, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

/* Smooth fade transition for amount changes */
@keyframes winAmountFade {
  0% {
    opacity: 0;
    transform: translateY(2px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.game-card-live-win.updating .live-win-amount {
  animation: winAmountFade 0.5s ease-out;
}

/* Light theme support */
body.light-theme .game-card-live-win {
  background: linear-gradient(90deg, rgba(26, 132, 74, 0.95) 0%, rgba(46, 204, 113, 0.95) 50%, rgba(26, 132, 74, 0.95) 100%);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-white);
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s, background 0.3s, color 0.3s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
  width: 100%;
}
.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
}
.btn-primary:active {
  background: var(--accent-gold-dark);
}

.text-center { text-align: center; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.text-gold { color: var(--accent-gold); }

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-card-secondary);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-size: 14px;
  animation: slideUp 0.3s ease forwards;
  opacity: 0;
  border-left: 4px solid var(--accent-gold);
  transition: background 0.3s, color 0.3s;
}
.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: var(--accent-red); }

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

/* Auth Screens */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  transition: background 0.3s;
}
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}
.auth-logo img {
  height: 40px;
}


/* ============================================================================
   ADVANCED ANIMATIONS & EFFECTS - PREMIUM CASINO FEEL
   ============================================================================ */

/* Advanced animations for premium feel */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Shimmer effect for loading states */
.shimmer-effect {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Smooth transitions for all interactive elements */
.mobile-sidebar-item,
.mobile-support-btn,
.mobile-free-money-banner,
.nav-item,
.game-card {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Enhanced hover states */
.mobile-sidebar-item:hover {
  transform: translateX(4px);
}

.mobile-support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mobile-free-money-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(216, 184, 76, 0.4);
}

/* Active states */
.mobile-sidebar-item:active {
  transform: scale(0.98);
}

.mobile-support-btn:active {
  transform: scale(0.98);
}

/* Ripple effect for buttons */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

/* Smooth page transitions */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-enter {
  animation: pageEnter 0.3s ease-out;
}

/* Loading skeleton animation */
@keyframes skeletonLoading {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton-loading {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 1000px 100%;
  animation: skeletonLoading 2s infinite;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .mobile-sidebar-item {
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .game-card-live-win {
    border-width: 2px;
  }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
  .mobile-sidebar-menu {
    background: #0f1523;
  }

  .mobile-sidebar-header {
    background: linear-gradient(135deg, #0f1523 0%, #151b29 100%);
  }
}

/* Light mode enhancements */
@media (prefers-color-scheme: light) {
  .mobile-sidebar-menu {
    background: #ffffff;
  }

  .mobile-sidebar-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  }
}

/* Print styles */
@media print {
  .mobile-sidebar-menu,
  .mobile-sidebar-overlay,
  .bottom-nav,
  .floating-support {
    display: none !important;
  }
}
