.lobby-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--primary-500);
}

.lobby {
  flex: 1;
  padding-bottom: 8px;
  overflow-y: auto;
}

/* ==============================
   Hero Section
   ============================== */
.lobby__hero {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 24px 20px;
  margin-bottom: 4px;
}

.lobby__hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1E305E 0%, #7F20F9 40%, #0080F6 70%, #040B1F 100%);
  z-index: 0;
}

.lobby__hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(127, 32, 249, 0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 128, 246, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 145, 119, 0.15) 0%, transparent 40%);
}

.lobby__hero-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 85% 75%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 85%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 15%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 35%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 55%, rgba(255,255,255,0.25) 0%, transparent 100%);
}

.lobby__hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.lobby__hero-subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  display: block;
  margin-bottom: 4px;
}

.lobby__hero-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.lobby__hero-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.lobby__hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.lobby__hero-btn {
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 20px;
}

.lobby__hero-btn--primary {
  background: var(--special-200);
  color: var(--primary-500);
}

.lobby__hero-btn--secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  backdrop-filter: blur(8px);
}

/* ==============================
   Quick Actions
   ============================== */
.lobby__quick-actions {
  padding: 12px 20px 8px;
}

.lobby__quick-list {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.lobby__quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.lobby__quick-item:active {
  background: rgba(255,255,255,0.05);
  transform: scale(0.95);
}

.lobby__quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.lobby__quick-item:active .lobby__quick-icon {
  transform: scale(0.9);
}

.lobby__quick-icon--spin {
  background: linear-gradient(135deg, #7F20F9, #5546B7);
  color: #fff;
}

.lobby__quick-icon--daily {
  background: linear-gradient(135deg, #25B755, #009177);
  color: #fff;
}

.lobby__quick-icon--battle {
  background: linear-gradient(135deg, #F47171, #DE3232);
  color: #fff;
}

.lobby__quick-icon--vip {
  background: linear-gradient(135deg, #F4DC00, #D27E00);
  color: var(--primary-500);
}

.lobby__quick-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

/* ==============================
   Marquee
   ============================== */
.lobby__marquee-section {
  padding: 8px 20px;
}

.lobby__marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--border-radius-sm);
  padding: 0 12px;
  height: 36px;
  overflow: hidden;
}

.lobby__marquee-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.lobby__marquee-track {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.lobby__marquee-inner {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.lobby__marquee-inner span {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

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

/* ==============================
   Small Banner
   ============================== */
.lobby__banner-sm-section {
  padding: 8px 20px;
}

.lobby__banner-sm {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  height: 72px;
  display: flex;
  align-items: center;
  width: 100%;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.lobby__banner-sm:active {
  transform: scale(0.98);
}

.lobby__banner-sm-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #DE3232 0%, #7F20F9 100%);
  opacity: 0.85;
}

.lobby__banner-sm-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,255,255,0.03) 20px,
    rgba(255,255,255,0.03) 40px
  );
}

.lobby__banner-sm-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 16px;
}

.lobby__banner-sm-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lobby__banner-sm-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--special-200);
}

.lobby__banner-sm-title {
  font-size: 15px;
  font-weight: 800;
}

.lobby__banner-sm-prize {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}

.lobby__banner-sm-arrow {
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
}

/* ==============================
   Filters
   ============================== */
.lobby__filters {
  padding: 12px 20px 8px;
}

.lobby__filter-strip {
  position: relative;
}

.lobby__filter-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}

.lobby__filter-list::-webkit-scrollbar {
  display: none;
}

.lobby__filter {
  flex-shrink: 0;
  padding: 7px 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.lobby__filter.active {
  background: var(--primary-300);
  color: #fff;
  border-color: var(--primary-300);
}

.lobby__filter:not(.active):active {
  background: rgba(255,255,255,0.1);
}

/* ==============================
   Games Section
   ============================== */
.lobby__games {
  padding: 8px 20px 16px;
}

.lobby__section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lobby__section-title {
  font-size: 17px;
  font-weight: 800;
}

.lobby__section-count {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.lobby__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.lobby__grid-skeleton {
  aspect-ratio: 3/4;
  border-radius: var(--border-radius-md);
}

/* Game Card */
.lobby__game-card {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--primary-400);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  border: 1px solid rgba(255,255,255,0.04);
  animation: fade-in 0.3s ease;
}

.lobby__game-card:active:not(.lobby__game-card--disabled) {
  transform: scale(0.95);
}

.lobby__game-card--disabled {
  opacity: 0.5;
  cursor: default;
}

.lobby__game-card--loading {
  opacity: 0.7;
}

.lobby__game-thumb {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--primary-500);
}

.lobby__game-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.lobby__game-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
}

.lobby__game-fallback span {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 0 8px;
  line-height: 1.3;
  word-break: break-word;
}

.lobby__game-tags {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.lobby__game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.lobby__game-overlay span {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.lobby__game-info {
  padding: 7px 8px 8px;
  position: relative;
}

.lobby__game-name {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: rgba(255,255,255,0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby__game-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

/* Empty state */
.lobby__empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 0;
  color: rgba(255,255,255,0.3);
}

.lobby__empty p {
  font-size: 14px;
}

/* Error state */
.lobby__error {
  text-align: center;
  color: var(--alert-300);
  padding: 40px 20px;
  font-size: 14px;
}
