* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

:root {
  --bg-dark: #0D0E15;
  --surface-dark: #151824;
  --surface-hover: #1E2235;
  --amber-primary: #FF9A3C;
  --amber-glow: rgba(255, 154, 60, 0.45);
  --amber-bright: #FFB366;
  --text-main: #F4F6FC;
  --text-dim: #8E95AA;
  --cabinet-bezel: #1F2333;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ARCADE HOUSING FRAME */
.arcade-housing {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-left: 2px solid #232738;
  border-right: 2px solid #232738;
  position: relative;
  background: radial-gradient(circle at 50% 20%, #1A1E2E 0%, #0D0E15 75%);
}

/* TOP MARQUEE */
.marquee-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(180deg, #1A1D2B 0%, #12141F 100%);
  border-bottom: 2px solid var(--amber-primary);
  box-shadow: 0 4px 20px rgba(255, 154, 60, 0.25);
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--amber-primary);
  box-shadow: 0 0 10px var(--amber-glow);
  object-fit: cover;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber-primary);
  text-shadow: 0 0 12px var(--amber-glow);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-title.hidden-in-game {
  display: none !important;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.8px;
}

/* MARQUEE CONTROLS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arcade-btn {
  background: var(--surface-dark);
  color: var(--amber-bright);
  border: 1px solid var(--amber-primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arcade-btn:hover {
  background: var(--amber-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 16px var(--amber-primary);
  transform: translateY(-1px);
}

.arcade-btn:active {
  transform: translateY(1px);
}

/* MAIN HOUSING SCREEN VIEWPORT */
.screen-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #06070A;
}

/* CRT SCANLINE & BEZEL EFFECT (Retro Touch) */
.screen-viewport::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.35;
}

/* LOBBY / MENU OVERLAY */
.lobby-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px 24px;
  z-index: 20;
}

/* TOP TABS: ALL / FAVORITES */
.lobby-nav-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.lobby-tabs {
  display: flex;
  gap: 12px;
  background: rgba(14, 16, 24, 0.85);
  padding: 6px 10px;
  border-radius: 30px;
  border: 1px solid #282c40;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.tab-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 154, 60, 0.15);
}

.tab-btn.active {
  background: var(--amber-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 14px var(--amber-glow);
}

.fav-count-badge {
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.carousel-wrapper {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 6px 0;
}

.game-carousel {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  overflow-x: hidden;
  padding: 8px 4px;
}

/* BOTTOM NAVIGATION (< > for next 3 games) */
.carousel-bottom-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  z-index: 25;
}

.nav-arrow-btn {
  background: var(--surface-dark);
  border: 1.5px solid var(--amber-primary);
  color: var(--amber-bright);
  font-family: inherit;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 1.5px;
  padding: 9px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-arrow-btn:hover:not(:disabled) {
  background: var(--amber-primary);
  color: var(--bg-dark);
  box-shadow: 0 0 16px var(--amber-glow);
  transform: translateY(-2px);
}

.nav-arrow-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.nav-arrow-btn:disabled {
  opacity: 0.35;
  border-color: #3a415a;
  color: #5d6785;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.carousel-page-indicator {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* GAME CARD HOUSING */
.game-card {
  width: 320px;
  background: var(--surface-dark);
  border: 2px solid #282C40;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}

.game-card:hover, .game-card.active {
  border-color: var(--amber-primary);
  box-shadow: 0 0 25px var(--amber-glow);
  transform: translateY(-6px) scale(1.02);
}

.card-hero {
  height: 180px;
  width: 100%;
  background-color: #0E1018;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(13, 14, 21, 0.85);
  border: 1px solid var(--amber-primary);
  color: var(--amber-bright);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* TOP LEFT FAVORITE HEART ICON */
.card-fav-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 14, 21, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #7982a6;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(6px);
  z-index: 10;
  user-select: none;
}

.card-fav-btn:hover {
  transform: scale(1.15);
  border-color: #ff3366;
  color: #ff3366;
  background: rgba(255, 51, 102, 0.15);
}

.card-fav-btn.is-fav {
  color: #ff3366;
  border-color: #ff3366;
  background: rgba(255, 51, 102, 0.25);
  box-shadow: 0 0 12px rgba(255, 51, 102, 0.5);
  transform: scale(1.05);
}

.card-body {
  padding: 18px 20px;
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFF;
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--amber-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 16px;
  min-height: 38px;
}

.card-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.meta-tag {
  background: #1F2335;
  color: #ADB4CA;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

.play-action-btn {
  width: 100%;
  background: linear-gradient(135deg, #FF9A3C 0%, #FF6014 100%);
  color: #0D0E15;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1.5px;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(255, 96, 20, 0.35);
  transition: all 0.2s ease;
}

.play-action-btn:hover {
  box-shadow: 0 0 20px #FF9A3C;
  transform: scale(1.02);
}

/* ACTIVE GAME HOSTING IFRAME CONTAINER */
.game-frame-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 15;
  display: none;
  background-color: #000;
}

.game-frame-container.active {
  display: block;
}

.game-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* IN-GAME TOP BAR (HUD CONTROLS INSIDE MARQUEE) */
.in-game-bar {
  display: none;
  align-items: center;
  gap: 12px;
}

.in-game-bar.active {
  display: flex;
}

.game-hud-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--amber-primary);
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px var(--amber-glow);
  padding-right: 6px;
  border-right: 1px solid #282C40;
}

.arcade-btn.exit-btn {
  border-color: #FF5252;
  color: #FF5252;
}

.arcade-btn.exit-btn:hover {
  background: #FF5252;
  color: #FFF;
  box-shadow: 0 0 16px rgba(255, 82, 82, 0.6);
}

/* BOTTOM ARCADE BEZEL */
.arcade-footer {
  padding: 10px 24px;
  background: #11131C;
  border-top: 1px solid #232738;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  z-index: 50;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E676;
  box-shadow: 0 0 8px #00E676;
}
