/* ========================================================
   AERIX PLAY - Premium Mobile-First Gaming Theme
   Inspired by DmPlay Gaming Platform
   ======================================================== */

:root {
  --primary-gradient: linear-gradient(135deg, #FF4B2B 0%, #FF416C 100%);
  --primary-color: #FF4B2B;
  --secondary-color: #FF416C;
  --accent-gold: #FFB300;
  --accent-purple: #9C27B0;
  --accent-green: #2E7D32;
  --accent-red: #D32F2F;
  --accent-blue: #1976D2;
  --bg-body: #F4F6F9;
  --bg-card: #FFFFFF;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(255, 75, 43, 0.12);
  --shadow-lg: 0 10px 25px rgba(255, 65, 108, 0.2);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --app-max-width: 480px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 75px; /* space for bottom nav */
}

/* Desktop App Container */
.app-container {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: #FFFFFF;
  position: relative;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at top, #ffe4df, #eef2f6 60%);
  }
}

/* Header */
.app-header {
  background: var(--primary-gradient);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: #fff;
  color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.brand-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-badge {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.wallet-badge:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-header-auth {
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-header-login {
  background: #fff;
  color: var(--primary-color);
}

.btn-header-reg {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Announcement Ticker */
.announcement-bar {
  background: #FFF7ED;
  border-bottom: 1px solid #FFEDD5;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #C2410C;
}

.announcement-icon {
  font-size: 1.1rem;
  animation: pulse 2s infinite;
}

.announcement-marquee {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
}

.marquee-content {
  display: inline-block;
  animation: marquee 22s linear infinite;
}

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

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

/* Hero Carousel */
.hero-slider-wrap {
  padding: 12px 14px 6px;
}

.hero-slide-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 2.1 / 1;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  color: #fff;
  text-decoration: none;
}

.hero-slide-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.hero-slide-content p {
  font-size: 0.78rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary-color);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Categories Bar (DmPlay style tab chips) */
.category-tabs-wrap {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #F1F5F9;
  color: var(--text-muted);
  border-radius: 25px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.category-pill.active, .category-pill:hover {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 3px 10px rgba(255, 75, 43, 0.3);
}

/* Section Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 6px;
}

.section-title {
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary-gradient);
  border-radius: 4px;
}

.section-more {
  font-size: 0.78rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
}

/* Game Card Grid (DmPlay Style) */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 14px 16px;
}

.game-grid.single-col {
  grid-template-columns: 1fr;
}

.game-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #F1F5F9;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(255, 75, 43, 0.15);
}

.game-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #FAFAFA;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.game-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #FF9800, #F44336);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.game-card-body {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-card-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 135px;
}

.game-card-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.game-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 3px 8px rgba(255, 75, 43, 0.3);
  flex-shrink: 0;
}

/* Floating Reward & Support Buttons */
.floating-support-btn {
  position: fixed;
  right: 18px;
  bottom: 85px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
  z-index: 99;
  text-decoration: none;
  transition: transform 0.2s;
}

.floating-support-btn:hover {
  transform: scale(1.1);
  color: #fff;
}

.floating-reward-icon {
  position: fixed;
  left: 18px;
  bottom: 85px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB300, #F57C00);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 16px rgba(255, 179, 0, 0.4);
  z-index: 99;
  cursor: pointer;
  animation: bounce 2.5s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Fixed Bottom Navigation (DmPlay Style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 8px;
  z-index: 1000;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #94A3B8;
  font-size: 0.72rem;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
  padding: 2px 8px;
}

.nav-item i, .nav-item .nav-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: transform 0.2s;
}

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

.nav-item.active i {
  transform: translateY(-2px);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 20px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: 3px;
}

/* Forms & Auth */
.auth-wrapper {
  padding: 24px 18px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  display: block;
}

.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group-custom i {
  position: absolute;
  left: 14px;
  color: #94A3B8;
  font-size: 1rem;
}

.form-control-custom {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  background: #F8FAFC;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control-custom:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 75, 43, 0.15);
}

.btn-primary-gradient {
  width: 100%;
  padding: 12px;
  border-radius: 25px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s;
}

.btn-primary-gradient:hover {
  opacity: 0.92;
}

.btn-primary-gradient:disabled {
  background: #CBD5E1;
  box-shadow: none;
  cursor: not-allowed;
}

/* Modals & Alerts */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.custom-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.custom-modal-backdrop.active .custom-modal-content {
  transform: scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 380px;
  pointer-events: none;
}

.custom-toast {
  background: #1E293B;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

.custom-toast.success {
  background: #10B981;
}

.custom-toast.error {
  background: #EF4444;
}

.custom-toast.info {
  background: #3B82F6;
}

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

/* Wingo Balls */
.ball-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.ball-red { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.ball-green { background: linear-gradient(135deg, #10B981, #047857); }
.ball-violet { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.ball-red-violet { background: linear-gradient(135deg, #EF4444 50%, #8B5CF6 50%); }
.ball-green-violet { background: linear-gradient(135deg, #10B981 50%, #8B5CF6 50%); }
