/* Main Content Spacing */
main.container {
  margin-top: 0;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Photo Banner Section */
.photo-banner {
  margin-bottom: 8px;
  /* Reduce spacing beneath banner */
}

/* Carousel banner - Full Width Style */
.banner-carousel {
  position: relative;
  border-radius: 0 0 20px 20px;
  /* Only round bottom corners */
  overflow: hidden;
  background: var(--c-surface-light);
  box-shadow: var(--shadow-md);
  transform: none;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  /* White curved border line */
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  height: auto;
}

.banner-carousel .carousel-track {
  display: flex;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.banner-carousel .carousel-slide {
  min-width: 100%;
  height: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-carousel img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.banner-carousel svg {
  width: 100%;
  height: 100%;
  display: block;
}

.banner-desktop {
  display: block;
}

.banner-mobile {
  display: none;
}

@media (max-width: 768px) {
  .banner-desktop {
    display: block;
  }

  .banner-mobile {
    display: none;
  }
}

/* Stage lighting effect overlay */
.banner-carousel::after {
  content: none;
  display: none;
}

.banner-carousel .carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.banner-carousel .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-carousel .dot.active {
  background: var(--c-primary);
  width: 20px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .banner-carousel {
    height: auto;
    border-radius: 0 0 16px 16px;
    transform: none;
    max-width: 100%;
    box-shadow: var(--shadow-md);
  }

  .banner-carousel .carousel-track,
  .banner-carousel .carousel-slide {
    height: auto;
  }

  .banner-carousel img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* User Profile & Balance Section - Reduced top margin */
.profile-balance-section {
  margin: 8px 0 24px 0;
  display: none;
}

.profile-card {
  background: var(--c-surface-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-glow);
}

.user-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex: 1;
}

.user-avatar {
  position: relative;
}

.user-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--c-primary);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.online-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--c-primary);
  border-radius: 50%;
  border: 2px solid var(--c-accent);
}

.user-details h3 {
  margin: 0 0 4px 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--c-text);
}

.user-details p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: var(--c-text-muted);
  opacity: 1;
}

.balance-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-item .balance-label {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
  color: var(--c-text-muted);
  opacity: 1;
  display: block;
  margin-bottom: 4px;
}

.balance-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.balance-value .currency {
  font-size: var(--font-size-sm);
  color: var(--c-primary);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
}

.balance-value .amount {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--c-text);
}

.balance-topup-btn {
  background: var(--c-accent);
  /* Amber/Gold for "Need Balance" action */
  color: var(--c-black);
  /* Black text for contrast on amber */
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}

.balance-topup-btn:hover {
  background: #ffca28;
  /* Lighter amber */
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 520px) {
  .profile-card {
    padding: 16px;
    gap: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .user-info {
    gap: 12px;
    justify-content: flex-start;
  }

  .user-img {
    width: 50px;
    height: 50px;
  }

  .user-details h3 {
    font-size: var(--font-size-base);
  }

  .user-details p {
    font-size: var(--font-size-xs);
  }

  .balance-info {
    gap: 12px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .balance-item .balance-label {
    font-size: var(--font-size-xs);
  }

  .balance-value .amount {
    font-size: var(--font-size-xl);
  }

  .balance-value .currency {
    font-size: var(--font-size-sm);
  }

  .balance-topup-btn {
    padding: 10px 16px;
    font-size: var(--font-size-sm);
    white-space: nowrap;
  }
}

/* Games Grid Section - New Pill Design */
.games-grid {
  margin-top: 12px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  width: 100%;
  margin-bottom: 12px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 items per row on mobile */
  gap: 16px 8px;
  /* Reduced gap: Vertical, Horizontal */
  padding: 8px 16px;
  /* Add side padding back since container padding is gone */
  width: 100%;
}

@media (min-width: 640px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.app-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 24px;
  /* Indent to make room for the left circle */
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Reset previous styles */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  min-height: auto;
  overflow: visible;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-item.show {
  opacity: 1;
  transform: translateY(0);
}

.app-item:hover {
  transform: scale(1.03) translateY(-2px);
  z-index: 10;
}

.app-grid:hover .app-item {
  opacity: 0.8;
}

.app-grid:hover .app-item:hover {
  opacity: 1;
  transform: scale(1.05) translateY(-4px);
}


/* The Left Circle */
.game-card__circle {
  position: absolute;
  left: -24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  /* Updated to theme gradient */
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.game-card__circle-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c-surface-light);
  /* Use variable */
  overflow: hidden;
  border: 2px solid #ffffff;
  /* Inner white border */
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card__circle-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The Pill Body */
.game-card__pill {
  flex: 1;
  background: #ffffff;
  height: 52px;
  border-radius: 12px 26px 26px 12px;
  /* Pill shape */
  display: flex;
  align-items: center;
  padding-left: 42px;
  /* Space for circle overlap */
  padding-right: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
}

/* Inner content of the pill */
.game-card__content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.game-card__logo {
  max-height: 36px;
  max-width: 100px;
  object-fit: contain;
}

/* Text fallback if no logo image */
.game-card__text {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: 0.5px;
}

/* Decorative Badge (Tickets) */
.game-card__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  /* Positioned near the junction */
  z-index: 6;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.game-card__badge i {
  color: var(--c-accent);
  /* Amber/Gold */
  font-size: 20px;
  transform: rotate(-15deg);
  background: -webkit-linear-gradient(#ffe082, var(--c-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* Remove quick-links styles as they're no longer needed */
/* --- Removed legacy banner-image and duplicate mobile grid/icon rules to avoid conflicts --- */

/* Login Prompt Section Styles */
.login-prompt-section {
  margin: 8px 0 12px 0;
}

.login-prompt-card {
  background: var(--c-surface-light);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  border: none;
  text-align: center;
  box-shadow: var(--shadow-glow);
  width: 100%;
}

.login-prompt-content h3 {
  margin: 0 0 8px 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--c-text);
}

.login-prompt-content p {
  margin: 0 0 16px 0;
  font-size: var(--font-size-sm);
  color: var(--c-text-muted);
  line-height: var(--line-height-normal);
}

.login-prompt-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.neon-text {
  color: var(--c-text);
}

.neon-btn {
  box-shadow: var(--shadow-glow);
}

.neon-border {
  box-shadow: var(--shadow-glow);
}

.login-btn,
.register-btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-family-primary);
}

.login-btn {
  background: var(--c-primary);
  color: var(--c-white);
  box-shadow: var(--shadow-md);
}

.login-btn:hover {
  background: #1fb5d8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.register-btn {
  background: var(--c-white);
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
  box-shadow: var(--shadow-soft);
}

.register-btn:hover {
  background: var(--c-primary);
  color: var(--c-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Mobile responsive design for login prompt */
@media (max-width: 520px) {
  .login-prompt-section {
    margin: 6px 0 12px 0;
  }

  .login-prompt-card {
    padding: 16px 12px;
    margin: 0;
    width: 100%;
  }

  .login-prompt-content h3 {
    font-size: var(--font-size-lg);
  }

  .login-prompt-content p {
    font-size: var(--font-size-xs);
  }

  .login-prompt-actions {
    flex-direction: row;
    gap: 6px;
  }

  .login-btn,
  .register-btn {
    width: auto;
    padding: 12px 16px;
  }
}

/* Consolidated: duplicate games-grid/app-grid rules removed above to avoid conflicts */

/* MLBB Region Checker Section Styles */
.mlbb-checker-section {
  margin: 12px auto 24px auto;
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  /* Match standard container padding */
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .mlbb-checker-section {
    padding: 0 16px;
  }
}

.mlbb-checker-card {
  background-color: var(--c-surface-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Lighter border for "more white" feel */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.checker-header h3 {
  margin: 0 0 12px 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  /* Explicitly white */
  background: none;
  -webkit-text-fill-color: unset;
}

.checker-subtitle {
  margin: 0 0 12px 0;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
  /* Lighter text-muted */
}

.checker-form {
  display: flex;
  align-items: flex-end;
  /* Align inputs and button to bottom */
  gap: 12px;
  flex-wrap: wrap;
}

.checker-grid {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .checker-form {
    flex-direction: row;
    /* Keep in row on mobile */
    align-items: flex-end;
    gap: 8px;
    justify-content: space-between;
  }

  .checker-grid {
    flex-direction: row;
    gap: 8px;
    flex: 1;
    /* Take available space */
  }

  .input-group {
    flex: 1;
    /* Distribute space evenly */
    min-width: 0;
    /* Allow shrinking */
  }

  .input-group input {
    width: 100%;
    font-size: var(--font-size-xs);
    /* Smaller font on mobile */
    padding: 10px 8px;
    min-height: 44px;
  }

  .checker-btn {
    width: 44px;
    /* Fixed square width */
    height: 44px;
    /* Fixed square height */
    margin-left: 0;
    padding: 0;
    white-space: nowrap;
    justify-content: center;
    border-radius: var(--radius-md);
    /* Consistent rounding */
  }

  .checker-btn span {
    display: none;
  }

  /* But user wants "professional", maybe icon only? Or "Check"? */
  /* Let's keep text for now but ensure it fits. */
}

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

.input-group label {
  font-size: var(--font-size-xs);
  color: #ffffff;
  font-weight: var(--font-weight-medium);
}

.input-group input {
  width: 100%;
  max-width: 140px;
  /* Reduced width */
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: #ffffff;
  /* White background */
  color: #9400d3;
  /* Violet text */
  font-weight: var(--font-weight-bold);
  /* Bold font */
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  font-family: var(--font-family-primary);
  /* Professional font */
}

.input-group input::placeholder {
  color: #9ca3af;
  /* Light gray placeholder for white bg */
  opacity: 1;
}

.input-group input:focus {
  border-color: #9400d3;
  /* Violet border on focus */
  box-shadow: 0 0 0 2px rgba(148, 0, 211, 0.2);
}

.input-group input:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-glow);
}

.checker-btn {
  align-self: end;
  /* Align to bottom of form on desktop */
  justify-self: end;
  background: var(--c-surface);
  /* Darker surface for contrast */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  /* White border */
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  /* Consistent rounding */
  font-size: 18px;
  /* Icon size */
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: var(--shadow-soft);
}

.checker-btn:hover {
  background: var(--c-surface-light);
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.checker-btn:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-glow);
}

.checker-btn.loading {
  opacity: 0.8;
  cursor: wait;
}

.checker-result {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  background-color: var(--c-surface);
}