/* ==========================================================================
   1Playable - Games Showcase & Mobile Frame Simulator Styles
   Square card thumbnails, floating cross only, clean mobile frame.
   ========================================================================== */

.games-page-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.games-header-section {
  padding: 2rem 0 1.5rem 0;
  text-align: center;
}

/* 3-col grid, capped at 900px for balanced square cards */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

@media (max-width: 700px) {
  .games-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
}

@media (max-width: 440px) {
  .games-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
}

.game-item-card {
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sharp);
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.game-item-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-sharp);
}

.game-thumb-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-subtle);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.game-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-meta-tags {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.game-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.game-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sharp);
}

.badge-primary {
  background-color: var(--border-sharp);
  color: var(--text-inverse);
}

.badge-subtle {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

/* ==========================================================================
   Playable Game Simulator Modal — CROSS ONLY, NO STATUS BAR
   ========================================================================== */

.game-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.game-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.game-modal-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Close button floats top-right of the phone */
.modal-close-only-bar {
  position: absolute;
  top: -44px;
  right: 0;
  z-index: 200;
}

.modal-close-btn-cross {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.15s ease;
}

.modal-close-btn-cross:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* PC Phone Mockup — no status bar */
.phone-mockup-frame {
  width: 340px;
  height: 650px;
  background-color: #0a0a0a;
  border: 2px solid #2a2a2a;
  border-radius: 38px;
  padding: 14px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.9);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Top notch pill only — no status bar text */
.phone-notch {
  width: 90px;
  height: 18px;
  background-color: #0a0a0a;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-camera-lens {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #1a1a1a;
  border: 1px solid #333;
}

/* Screen fills phone area — iframe takes full height */
.phone-screen-canvas {
  width: 100%;
  height: 100%;
  background-color: #000;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Status bar REMOVED — iframe takes 100% */
.game-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: #fff;
  flex: 1;
  display: block;
  touch-action: manipulation;
}

/* === Mobile: fullscreen overlay === */
@media (max-width: 768px) {
  .game-modal-container {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    justify-content: center;
  }

  .phone-mockup-frame {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    border: none;
    padding: 0;
  }

  .phone-notch {
    display: none;
  }

  .phone-screen-canvas {
    border-radius: 0;
  }

  .modal-close-only-bar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 300;
  }
}
