/* ==================== LINO IR LUKO ŽAIDIMŲ PORTALAS (MINECRAFT / ROBLOX 3D BLOCK STYLE) ==================== */
:root {
  /* Ryškios „plastikinės“ Roblox / Minecraft spalvos */
  --sky-top: #0284c7;
  --sky-mid: #38bdf8;
  --sky-bottom: #7dd3fc;

  --plastic-green: #22c55e;
  --plastic-green-dark: #15803d;
  --plastic-green-edge: #14532d;

  --plastic-blue: #2563eb;
  --plastic-blue-dark: #1d4ed8;
  --plastic-blue-edge: #1e3a8a;

  --plastic-orange: #f97316;
  --plastic-orange-dark: #c2410c;
  --plastic-orange-edge: #7c2d12;

  --plastic-yellow: #facc15;
  --plastic-yellow-dark: #ca8a04;

  --dirt-brown: #854d0e;
  --dirt-brown-dark: #5c3409;
  --grass-bright: #4ade80;

  --asphalt-dark: #1e293b;
  --asphalt-deep: #0f172a;

  --block-outline: #0f172a;
  --card-surface: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #334155;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  /* Ryškus melsvas dangus + subtilus kvadratinių blokelių (pikseliuotas) tinklelis */
  background-color: var(--sky-mid);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.14) 2px, transparent 2px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.14) 2px, transparent 2px),
    linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-bottom) 100%);
  background-size:
    64px 64px,
    64px 64px,
    16px 16px,
    16px 16px,
    100% 100%;
}

/* ==================== KVADRATINIAI DEBESĖLIAI (VOXEL CLOUDS) ==================== */
.voxel-cloud {
  position: fixed;
  background: rgba(255, 255, 255, 0.85);
  border: 4px solid var(--block-outline);
  box-shadow: 8px 8px 0 rgba(15, 23, 42, 0.22);
  pointer-events: none;
  z-index: 0;
}

.voxel-cloud::before,
.voxel-cloud::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border: 4px solid var(--block-outline);
}

.cloud-1 {
  width: 150px;
  height: 44px;
  top: 48px;
  left: 5%;
}
.cloud-1::before {
  width: 76px;
  height: 32px;
  top: -28px;
  left: 24px;
  border-bottom: none;
}

.cloud-2 {
  width: 190px;
  height: 50px;
  top: 90px;
  right: 6%;
}
.cloud-2::before {
  width: 96px;
  height: 34px;
  top: -30px;
  left: 40px;
  border-bottom: none;
}

.cloud-3 {
  width: 130px;
  height: 40px;
  bottom: 140px;
  left: 8%;
}
.cloud-3::before {
  width: 64px;
  height: 26px;
  top: -22px;
  left: 26px;
  border-bottom: none;
}

/* ==================== PAGRINDINIS KONTEINERIS ==================== */
.portal-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ==================== PORTALO ANTRAŠTĖ (3D PLASTIKINIS BLOKAS) ==================== */
.portal-header {
  text-align: center;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 5px solid var(--block-outline);
  border-radius: 14px;
  padding: 30px 24px 28px;
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.28),
    inset 0 -6px 0 rgba(15, 23, 42, 0.35),
    0 12px 0 var(--block-outline),
    0 20px 0 rgba(15, 23, 42, 0.22);
  color: #ffffff;
  position: relative;
}

.portal-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  width: 86px;
  height: 76px;
  border-radius: 12px;
  background: var(--plastic-yellow);
  border: 4px solid var(--block-outline);
  box-shadow:
    inset 0 5px 0 #fef08a,
    inset 0 -5px 0 var(--plastic-yellow-dark),
    0 7px 0 var(--block-outline);
  margin-bottom: 16px;
}

.portal-header h1 {
  font-family: 'Russo One', 'Bungee', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.9rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fde047;
  text-shadow:
    0 4px 0 var(--block-outline),
    3px 4px 0 var(--block-outline),
    -2px -2px 0 var(--block-outline),
    2px -2px 0 var(--block-outline),
    -2px 2px 0 var(--block-outline);
  margin-bottom: 10px;
}

.portal-subtitle {
  font-family: 'Russo One', sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: #e0f2fe;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 var(--block-outline);
  max-width: 680px;
  margin: 0 auto 22px;
}

/* Lino ir Luko taškų blokeliai */
.portal-heroes-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 4px solid var(--block-outline);
  font-size: 0.98rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 0 var(--block-outline);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.3),
    0 6px 0 var(--block-outline);
}

.pill-linas {
  background: var(--plastic-green);
}

.pill-lukas {
  background: var(--plastic-orange);
}

.hero-dot {
  font-size: 1.35rem;
}

/* ==================== SEKCIJOS ANTRAŠTĖ ==================== */
.games-grid-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border: 4px solid var(--block-outline);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow:
    inset 0 -4px 0 #cbd5e1,
    0 8px 0 var(--block-outline);
}

.section-heading h2 {
  font-family: 'Russo One', 'Bungee', sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--block-outline);
  text-transform: uppercase;
}

.games-count-badge {
  font-family: 'Press Start 2P', 'Russo One', monospace;
  background: var(--plastic-yellow);
  border: 3px solid var(--block-outline);
  color: var(--block-outline);
  font-size: 0.72rem;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 0 var(--block-outline);
}

/* ==================== ŽAIDIMŲ KORTELIŲ TINKLELIS (2 DIDELI 3D BLOKAI) ==================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

/* ==================== 3D BLOKELIO ŽAIDIMO KORTELĖ ==================== */
.game-tile {
  background: var(--card-surface);
  border: 5px solid var(--block-outline);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  /* Kietas, neišlietas 3D blokelio šešėlis */
  box-shadow:
    0 12px 0 var(--block-outline),
    10px 12px 0 rgba(15, 23, 42, 0.28);
  transition:
    transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2),
    box-shadow 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* HOVER EFEKTAS: Blokelis iššoka į priekį, padidėja scale(1.05) ir kietas šešėlis tampa dar gilesnis */
.game-tile:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow:
    0 20px 0 var(--block-outline),
    16px 20px 0 rgba(15, 23, 42, 0.32);
  z-index: 5;
}

.game-tile:active {
  transform: translateY(2px) scale(1.01);
  box-shadow:
    0 6px 0 var(--block-outline),
    4px 6px 0 rgba(15, 23, 42, 0.25);
}

/* ==================== KORTELIŲ TEMINIAI FONAI ==================== */
.tile-art {
  height: 235px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--block-outline);
}

/* 1 KORTELĖ: MINECRAFT ŽOLĖS IR ŽEMĖS BLOKELIS */
.art-grass-dirt {
  background-color: var(--dirt-brown);
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.16) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.16) 75%);
  background-position: 0 0, 16px 16px;
  background-size: 32px 32px;
}

.grass-top-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(180deg, var(--grass-bright) 0%, var(--plastic-green) 78%, var(--plastic-green-dark) 100%);
  border-bottom: 5px solid var(--block-outline);
  z-index: 0;
}

/* 2 KORTELĖ: ASFALTO IR LENKTYNIŲ VĖLIAVOS (LANGELIŲ) FONAS */
.art-asphalt-checkered {
  background-color: var(--asphalt-dark);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2px),
    linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  background-size: 16px 16px, 100% 100%;
}

.checkered-top-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #0f172a 25%, transparent 25%),
    linear-gradient(-45deg, #0f172a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #0f172a 75%),
    linear-gradient(-45deg, transparent 75%, #0f172a 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  border-bottom: 5px solid var(--block-outline);
  z-index: 0;
}

.road-lane-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 10px;
  background: repeating-linear-gradient(
    90deg,
    #facc15 0px,
    #facc15 36px,
    transparent 36px,
    transparent 68px
  );
  opacity: 0.75;
  z-index: 0;
}

/* ==================== KORTELĖS ELEMENTAI VIRŠUJE ==================== */
.tile-top-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tile-status-badge {
  font-family: 'Russo One', sans-serif;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 3px solid var(--block-outline);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 0 var(--block-outline);
}

.badge-green {
  background: var(--plastic-yellow);
  color: var(--block-outline);
}

.badge-orange {
  background: var(--plastic-orange);
  color: #ffffff;
  text-shadow: 0 2px 0 var(--block-outline);
}

.tile-block-id {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.75rem;
  background: var(--block-outline);
  color: #fde047;
  padding: 6px 10px;
  border-radius: 6px;
}

/* ==================== CENTRINĖ 3D IKONŲ KOMPOZICIJA ==================== */
.tile-icon-cluster {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 6px 0;
}

.tile-icon-cluster .main-icon {
  font-size: 4.6rem;
  background: rgba(15, 23, 42, 0.75);
  border: 4px solid var(--block-outline);
  border-radius: 16px;
  width: 98px;
  height: 98px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.25),
    0 8px 0 var(--block-outline);
  transition: transform 0.2s ease;
}

.tile-icon-cluster .sub-icon {
  font-size: 2.35rem;
  background: rgba(15, 23, 42, 0.68);
  border: 3px solid var(--block-outline);
  border-radius: 12px;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 0 var(--block-outline);
}

.game-tile:hover .tile-icon-cluster .main-icon {
  transform: translateY(-4px) scale(1.1) rotate(-4deg);
}

.art-tags {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.art-tags span {
  background: var(--block-outline);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

/* ==================== KORTELĖS TEKSTINĖ DALIS IR 3D MYGTUKAS ==================== */
.tile-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  box-shadow: inset 0 -8px 0 #e2e8f0;
}

.tile-body h3 {
  font-family: 'Russo One', 'Bungee', sans-serif;
  font-size: 1.65rem;
  color: var(--block-outline);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tile-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-weight: 800;
}

.tile-footer {
  margin-top: auto;
  padding-top: 6px;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  border-radius: 12px;
  font-family: 'Russo One', 'Bungee', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 3px 0 var(--block-outline);
  border: 4px solid var(--block-outline);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn-plastic-green {
  background: var(--plastic-green);
  box-shadow:
    inset 0 5px 0 #86efac,
    inset 0 -5px 0 var(--plastic-green-dark),
    0 8px 0 var(--block-outline);
}

.btn-plastic-green:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    inset 0 5px 0 #86efac,
    inset 0 -5px 0 var(--plastic-green-dark),
    0 10px 0 var(--block-outline);
}

.btn-plastic-orange {
  background: var(--plastic-orange);
  box-shadow:
    inset 0 5px 0 #fdba74,
    inset 0 -5px 0 var(--plastic-orange-dark),
    0 8px 0 var(--block-outline);
}

.btn-plastic-orange:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow:
    inset 0 5px 0 #fdba74,
    inset 0 -5px 0 var(--plastic-orange-dark),
    0 10px 0 var(--block-outline);
}

/* ==================== PORAŠTĖ (MINECRAFT ŽOLĖS BLOKELIS) ==================== */
.portal-footer {
  text-align: center;
  background: var(--dirt-brown);
  border: 4px solid var(--block-outline);
  border-top: 12px solid var(--plastic-green);
  border-radius: 12px;
  padding: 18px 20px;
  color: #fef08a;
  font-family: 'Russo One', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 var(--block-outline);
  box-shadow: 0 8px 0 var(--block-outline);
}

/* ==================== PRITAIKYMAS TELEFONAMS IR PLANŠETĖMS ==================== */
@media (max-width: 680px) {
  .portal-wrapper {
    padding: 20px 14px 44px;
    gap: 24px;
  }

  .portal-header {
    padding: 22px 16px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .game-tile:hover {
    transform: translateY(-5px) scale(1.02);
  }
}
