﻿@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@300;500;700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #0b0f16;
  --bg-soft: #121826;
  --accent: #ff8a3d;
  --accent-bright: #ffb45c;
  --accent-soft: #2b1f14;
  --text: #f4f2ee;
  --muted: #9aa4b2;
  --card: #151b2b;
  --border: #21283b;
  --border-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  --font-display: "Oswald", "Segoe UI", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: radial-gradient(circle at top left, #1c2234 0%, var(--bg) 55%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
}

.logo {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-nav a {
  font-size: 14px;
  color: var(--muted);
  margin-left: 18px;
}

.site-nav a:first-child {
  margin-left: 0;
}

.site-nav a:hover {
  color: var(--text);
}

.site-main {
  padding: 0 48px 80px;
}

.site-main .game-theme {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 28px;
  padding: 32px 0 32px;
  align-items: stretch;
}

.hero-copy h1,
.detail-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  margin: 8px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--accent);
  margin: 0;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
}

.hero--banner {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.18), rgba(21, 27, 43, 0.4));
  border-radius: 28px;
  padding: 24px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero--banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(255, 180, 92, 0.15), transparent 55%);
  pointer-events: none;
}

.hero-banner {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 260px;
  background: #0f1422;
}

.hero-banner__link {
  display: block;
  height: 100%;
  color: inherit;
}

.hero-banner__link:hover .hero-title {
  color: var(--accent-bright);
}

.hero-banner__media {
  position: relative;
  z-index: 0;
  height: 100%;
}

.hero-banner__media .steam-banner {
  height: 100%;
}

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

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 15, 22, 0.2), rgba(11, 15, 22, 0.85));
  z-index: 1;
  pointer-events: none;
}

.hero-banner__meta {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  z-index: 2;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(11, 15, 22, 0.7);
  border: 1px solid var(--border);
  color: var(--accent-bright);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
}

.hero-banner__fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 10px;
}

.hero-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-stat {
  background: rgba(11, 15, 22, 0.55);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  min-width: 140px;
}

.hero-stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
}

.hero-stat__label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}


.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0 40px;
}

.game-carousel {
  display: grid;
  gap: 12px;
  margin: 24px 0 40px;
}

.game-carousel__controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.game-grid--carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 18px;
  margin: 0;
  scrollbar-width: thin;
}

.game-grid--carousel::-webkit-scrollbar {
  height: 8px;
}

.game-grid--carousel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.game-grid--carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
  transition: transform 0.2s ease, border 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  min-height: 220px;
}

.game-grid--carousel .game-card {
  flex: 0 0 min(416px, 85vw);
  scroll-snap-align: start;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 138, 61, 0.14), transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.game-card:hover::before {
  opacity: 1;
}

.game-card:hover .card-button {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 18px rgba(255, 138, 61, 0.45);
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.card-header h2 {
  margin: 0;
}

.tag {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  align-self: flex-end;
  white-space: nowrap;
}

.card-link {
  margin-top: auto;
  font-size: 14px;
  color: var(--accent);
}

.game-card .card-button {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.game-focus,
.detail-grid {
  background: var(--bg-soft);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.focus-placeholder {
  text-align: center;
  color: var(--muted);
}

.focus-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.focus-card > div {
  flex: 1;
  min-width: 0;
}

.focus-card .button {
  flex-shrink: 0;
  white-space: nowrap;
}

.button {
  background: var(--accent);
  color: #1c140b;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-hero {
  padding: 32px 0 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.game-theme {
  display: grid;
  gap: 20px;
}

.game-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.game-mini-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  align-items: center;
}

.game-mini-card h4 {
  margin: 0 0 6px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 28px);
  gap: 25px;
  margin-top: 12px;
  justify-content: start;
}

.achievement-item {
  width: 50px;
  height: 50px;
}

.achievement-item img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.game-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
}

.detail-card {
  background: var(--card);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.screenshot-gallery {
  display: grid;
  gap: 12px;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}

.gallery-track::-webkit-scrollbar {
  height: 8px;
}

.gallery-item {
  flex: 0 0 clamp(220px, 45vw, 360px);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0f1422;
  scroll-snap-align: start;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.75);
}

.gallery-lightbox__panel {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  width: min(960px, 92vw);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.gallery-lightbox__close {
  justify-self: end;
}

.gallery-lightbox__image {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1422;
}

body.lightbox-open {
  overflow: hidden;
}

.theme-presets {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.theme-presets select {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.preview-header h4 {
  margin: 0;
}

.preview-frame {
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 12px;
  background: #0f1422;
}

.preview-sizes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.preview-frame iframe {
  width: 100%;
  height: clamp(360px, 70vh, 820px);
  border: 0;
  display: block;
  background: #0b0f16;
}

.preview-section {
  margin-top: 20px;
}

.preview-card {
  grid-column: 1 / -1;
}

.preview-frame.size-tablet {
  max-width: 900px;
  margin: 12px auto 0;
}

.preview-frame.size-mobile {
  max-width: 420px;
  margin: 12px auto 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  z-index: 60;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.auth-grid {
  align-items: start;
}

.auth-card {
  display: grid;
  gap: 16px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.auth-form input {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.auth-form select {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
}

.auth-form textarea {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  resize: vertical;
}

.auth-form input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.auth-form textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.auth-form select:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.steam-header {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.steam-banner {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0f1422;
}

.steam-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.steam-banner__fallback {
  padding: 28px;
  text-align: center;
}

.admin-grid {
  align-items: start;
}

.admin-card {
  display: grid;
  gap: 16px;
}

.admin-alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
}

.admin-alert-error {
  background: #3a1a1a;
  border-color: #6b2a2a;
  color: #ff9a9a;
}

.admin-alert-warning {
  background: #2b1f12;
  border-color: #5c3b1f;
  color: #f6ad55;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.status-ok {
  color: #68d391;
  background: #0f2a1d;
  border-color: #1f4d36;
}

.status-missing {
  color: #f6ad55;
  background: #2b1f12;
  border-color: #5c3b1f;
}

.status-error {
  color: #fc8181;
  background: #2a1414;
  border-color: #5b2727;
}

.status-empty {
  color: #f6ad55;
  background: #2b1f12;
  border-color: #5c3b1f;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.admin-inline-actions input {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.button.danger {
  background: transparent;
  border: 1px solid #d35b5b;
  color: #ff9a9a;
}

.button.danger:hover {
  background: #3a1a1a;
}

.admin-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.admin-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
}

.upload-dropzone {
  border: 1px dashed rgba(255, 138, 61, 0.6);
  background: linear-gradient(135deg, rgba(255, 138, 61, 0.08), transparent);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.upload-dropzone.is-dragging {
  border-color: var(--accent);
  background: rgba(255, 138, 61, 0.16);
  transform: translateY(-1px);
}

.upload-input {
  display: none;
}

.upload-copy {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.upload-url {
  flex: 1 1 260px;
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.upload-status.error {
  color: #ff9a9a;
}

.upload-preview {
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.upload-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.upload-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f1422;
}

.upload-item-main {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
}

.upload-item-main img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.upload-item-main input {
  width: 100%;
  background: #0b101c;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
}

.upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.partials-panel {
  display: grid;
  gap: 12px;
}

.partials-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.partials-code input {
  width: 100%;
  background: #0f1422;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
}

.partials-classes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.partials-classes-list span {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #3b2a1a;
}

.partials-preview {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f1422;
  padding: 14px;
  min-height: 120px;
}

.partials-preview-frame > *:first-child {
  margin-top: 0;
}

.partials-preview-frame img {
  max-width: 100%;
  height: auto;
}

.admin-meta {
  display: grid;
  gap: 6px;
  text-align: right;
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 16, 0.7);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  width: min(420px, 92vw);
  display: grid;
  gap: 12px;
  z-index: 50;
}

.modal[hidden] {
  display: none !important;
}

.modal-game-title {
  margin: 0;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-force[hidden] {
  display: none;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.auth-cta h3 {
  margin-top: 0;
}

.auth-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.auth-error {
  background: #3a1a1a;
  border: 1px solid #6b2a2a;
  padding: 10px 12px;
  border-radius: 10px;
}

.muted {
  color: var(--muted);
}

.site-footer {
  padding: 24px 48px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 768px) {
  .site-header,
  .site-main,
  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero--banner {
    padding: 20px;
  }

  .hero-banner {
    min-height: 200px;
  }

  .focus-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
