/* ===== PLAY 45 — Shared Styles ===== */

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

:root {
  --blue: #1a5fb4;
  --green: #0f8a5c;
  --green-bright: #26c281;
  --bg: #0e0e0e;
  --bg2: #151515;
  --bg3: #1c1c1c;
  --bg4: #222222;
  --text: #d8d8d8;
  --text-dim: #888;
  --border-grad: linear-gradient(135deg, var(--blue), var(--green));
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(26,95,180,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,95,180,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER ===== */
header {
  background: var(--bg2);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--blue), var(--green)) 1;
  box-shadow: 0 2px 16px rgba(26,95,180,0.12);
  position: sticky; top: 0; z-index: 100;
}


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

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  padding: 3px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  flex-shrink: 0;
}
.logo-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg2);
  display: block;
}

.brand-text h1 {
  font-size: 1.6rem;
  letter-spacing: 3px;
  line-height: 1;
  background: linear-gradient(to right, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 20px rgba(26,95,180,0.2);
}
.brand-text .subtitle {
  font-size: 0.67rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Header right side */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Social icons */
.social-links {
  display: flex; gap: 6px; align-items: center;
}
.social-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.social-icon img { width: 55%; height: 55%; object-fit: contain; }
.social-icon:hover { transform: scale(1.12); box-shadow: 0 0 10px rgba(255,255,255,0.2); }
.vk { background: #4C75A3; }
.telegram { background: #0088cc; }

/* Nav */
nav {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
}

.nav-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  background: linear-gradient(var(--bg3), var(--bg3)) padding-box,
              linear-gradient(135deg, var(--green), var(--blue), var(--green)) border-box;
  border: 2px solid transparent;
  letter-spacing: 0.3px;
}
.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(26,95,180,0.3);
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(15,138,92,0.3); }
  50% { box-shadow: 0 0 14px rgba(15,138,92,0.6), 0 0 24px rgba(26,95,180,0.2); }
}
.nav-btn.active {
  background: linear-gradient(var(--bg3), var(--bg3)) padding-box,
              linear-gradient(135deg, var(--green-bright), var(--green), var(--blue)) border-box;
  animation: glowPulse 2.5s ease-in-out infinite;
}

/* ===== MAIN ===== */
main { padding: 20px 0 36px; min-height: 70vh; }

/* ===== GAME BLOCK ===== */
.game-block {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  border-radius: 12px;
  padding: 18px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 22px rgba(0,0,0,0.45);
}
.game-block::before {
  content: '';
  position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, var(--blue), var(--green), var(--blue));
  border-radius: 14px; z-index: -1; opacity: 0.45;
  transition: opacity 0.3s;
}
.game-block:hover::before { opacity: 0.75; }

/* ===== TITLES ===== */
.game-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(to right, var(--green), var(--green-bright), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(0,0,0,0.5);
  text-shadow: 0 0 14px rgba(15,138,92,0.4);
}

.page-title {
  font-size: 1.7rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(to right, var(--green), var(--green-bright), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
  text-shadow: 0 0 16px rgba(15,138,92,0.35);
}

/* ===== DESCRIPTION ===== */
.game-description {
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.65;
  padding: 12px 14px;
  background: rgba(255,255,255,0.025);
  border-radius: 8px;
  border-left: 3px solid var(--green);
  margin-bottom: 12px;
}

/* ===== FEATURE CARDS ===== */
.game-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.feature {
  background: var(--bg4);
  padding: 13px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}
.feature h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(to right, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feature p { font-size: 0.82rem; color: #999; }

/* ===== DETAIL FEATURES (3-col) ===== */
.game-detail-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.detail-feature {
  background: var(--bg4);
  padding: 13px 13px 13px 17px;
  border-radius: 8px;
  position: relative;
}
.detail-feature::before {
  content: '';
  position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, var(--blue), var(--green));
  border-radius: 4px 0 0 4px;
}
.detail-feature h3 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 5px;
  background: linear-gradient(to right, var(--blue), var(--green));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.detail-feature p { font-size: 0.8rem; color: #999; line-height: 1.5; }

/* ===== PLAY BUTTON ===== */
.play-button-container {
  display: flex; justify-content: center;
  margin: 14px 0;
}

.play-button {
  padding: 11px 36px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(145deg, var(--green), var(--blue));
  border: 2px solid #000;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(15,138,92,0.3);
  text-decoration: none;
  display: inline-block;
  position: relative; overflow: hidden;
}
.play-button::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(145deg, var(--green-bright), var(--blue));
  opacity: 0; transition: opacity 0.25s;
}
.play-button:hover { transform: scale(1.04); box-shadow: 0 6px 22px rgba(15,138,92,0.5); }
.play-button:hover::after { opacity: 1; }
.play-button span { position: relative; z-index: 1; }

/* ===== SCREENSHOT ===== */
.screenshot-container {
  display: flex; justify-content: center; align-items: center;
  border-radius: 10px; overflow: hidden;
  position: relative; margin: 12px 0;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
}
.screenshot-container::before {
  content: '';
  position: absolute; inset: -2px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 12px; z-index: -1; opacity: 0.25;
  transition: opacity 0.3s;
}
.screenshot-container:hover::before { opacity: 0.5; }
.screenshot-container img,
.screenshot-container video {
  width: 50%; height: auto; display: block;
  border-radius: 6px;
  transition: transform 0.3s;
  margin: 8px auto;
}
.screenshot-container:hover img,
.screenshot-container:hover video { transform: scale(1.02); }

.screenshot-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff; padding: 10px; font-size: 0.8rem;
  opacity: 0; transition: opacity 0.25s;
}
.screenshot-container:hover .screenshot-caption { opacity: 1; }

/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-block;
  padding: 7px 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(var(--bg3), var(--bg3)) padding-box,
              linear-gradient(135deg, var(--blue), var(--green)) border-box;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s;
}
.back-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26,95,180,0.3); }

/* ===== HOME: GAME PREVIEW CARDS ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.game-preview {
  background: var(--bg3);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column; gap: 8px;
}
.game-preview::before {
  content: '';
  position: absolute; inset: -2px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-radius: 12px; z-index: -1; opacity: 0.35;
  transition: opacity 0.3s;
}
.game-preview:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(26,95,180,0.18); }
.game-preview:hover::before { opacity: 0.65; }

.game-preview-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--green-bright);
  border: 1px solid var(--green);
  border-radius: 4px;
  padding: 2px 7px;
  align-self: flex-start;
}

.game-preview h3 {
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--green), var(--green-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.game-preview p { font-size: 0.82rem; color: #999; flex: 1; }

.preview-link {
  display: inline-block;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.22s;
  align-self: flex-start;
  margin-top: 4px;
}
.preview-link:hover { box-shadow: 0 4px 14px rgba(15,138,92,0.45); transform: scale(1.04); }

/* ===== AUTHORS PAGE ===== */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.author-card {
  background: var(--bg4);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.author-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.author-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg4), var(--bg4)) padding-box,
              linear-gradient(135deg, var(--blue), var(--green)) border-box;
}

.author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e0e0e0;
  margin-bottom: 3px;
}
.author-role {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  line-height: 1.4;
}
.author-card .social-links {
  justify-content: center;
  margin-top: 8px;
}

/* ===== SEPARATOR ===== */
.game-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--green), transparent);
  margin: 20px 0;
  opacity: 0.4;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  max-width: 90%; max-height: 90%;
  position: relative;
  background: var(--bg2);
  border-radius: 12px; padding: 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}
.modal-content::before {
  content: '';
  position: absolute; top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: 14px; z-index: -1;
}
.modal-image,
.modal-video {
  max-width: 100%; max-height: 80vh;
  border-radius: 8px; display: block; margin: 0 auto;
}
.modal-caption { padding: 10px; text-align: center; color: #aaa; font-size: 0.85rem; }
.modal-close {
  position: absolute; top: -12px; right: -12px;
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff; border: none; border-radius: 50%;
  font-size: 1.1rem; cursor: pointer;
  display: flex; justify-content: center; align-items: center;
  z-index: 1001; transition: all 0.2s;
}
.modal-close:hover { transform: scale(1.1) rotate(90deg); }

/* ===== FOOTER ===== */
footer {
  background: #0a0a0a;
  padding: 14px 0;
  text-align: center;
  border-top: 1px solid rgba(26,95,180,0.2);
  margin-top: 28px;
}
footer p { color: #444; font-size: 0.8rem; }

/* ===== FLICKER TITLE (home page) ===== */
/* Overrides gradient approach so individual letters can be toggled */
.game-title-flicker {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-stroke: 0;
  color: var(--green);
  text-shadow:
    0 0 10px rgba(15,138,92,0.5),
    0 0 22px rgba(15,138,92,0.2);
}

.flicker-letter {
  display: inline;
  color: var(--green-bright);
  text-shadow:
    0 0 6px var(--green-bright),
    0 0 14px var(--green),
    0 0 28px rgba(38,194,129,0.3);
}

.flicker-letter.flicker-off {
  color: #0b1c11;
  text-shadow: none;
}

.flicker-letter.flicker-dim {
  color: #163825;
  text-shadow: 0 0 3px rgba(15,138,92,0.08);
}

/* ===== NUMBERED GAME LIST (home preview cards) ===== */
.game-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 6px;
  counter-reset: game-counter;
}
.game-list li {
  counter-increment: game-counter;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #d8d8d8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 0;
}
.game-list li::before {
  content: counter(game-counter, decimal-leading-zero) ".";
  color: var(--green-bright);
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #060606; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--blue), var(--green));
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--green-bright), var(--blue));
}

/* ===== SCROLL REVEAL ===== */
.anim-entry {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.anim-entry.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GLITCH HOVER ON TITLES ===== */
@keyframes glitch-shake {
  0%, 100% { transform: translate(0);       filter: none; }
  12%       { transform: translate(-3px, 1px);  filter: hue-rotate(35deg) brightness(1.25); }
  28%       { transform: translate(3px, -1px);  filter: hue-rotate(-25deg); }
  44%       { transform: translate(-2px, 1px);  filter: hue-rotate(30deg) brightness(0.85); }
  60%       { transform: translate(3px, -1px);  filter: hue-rotate(-20deg) brightness(1.15); }
  76%       { transform: translate(-1px, 1px);  filter: hue-rotate(15deg); }
  90%       { transform: translate(1px, 0);     filter: none; }
}

.game-title { cursor: default; }
.game-title:hover {
  animation: glitch-shake 0.38s ease 1;
}

/* ===== TYPEWRITER CURSOR ===== */
.subtitle-typing::after {
  content: '|';
  color: var(--green-bright);
  animation: cursor-blink 0.65s step-end infinite;
  margin-left: 1px;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== PREVIEW THUMBNAILS (home) ===== */
.preview-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.85) saturate(0.9);
}
.game-preview:hover .preview-thumb {
  transform: scale(1.03);
  filter: brightness(1) saturate(1.1);
}

.preview-video-wrap {
  width: 100%;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.preview-video-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.9);
  transition: filter 0.3s ease;
}
.game-preview:hover .preview-video-wrap video {
  filter: brightness(1) saturate(1.1);
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 900px) {
  .game-detail-features {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0;
    gap: 8px;
  }
  .header-right { justify-content: center; }
  nav { justify-content: center; gap: 5px; }
  .nav-btn { font-size: 0.75rem; padding: 5px 10px; }

  .brand-text h1 { font-size: 1.4rem; }
  .brand-text .subtitle { font-size: 0.62rem; }
  .logo-img { width: 42px; height: 42px; }

  .game-title { font-size: 1.25rem; letter-spacing: 1px; }
  .page-title { font-size: 1.4rem; }

  .game-detail-features { grid-template-columns: 1fr; gap: 8px; }

  .screenshot-container img,
  .screenshot-container video { width: 80%; }

  .game-block { padding: 14px; }
  .detail-feature { padding: 11px 11px 11px 15px; }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .brand { gap: 8px; }
  .brand-text h1 { font-size: 1.25rem; letter-spacing: 2px; }
  .logo-img { width: 38px; height: 38px; }

  nav { gap: 4px; }
  .nav-btn { font-size: 0.7rem; padding: 5px 8px; border-radius: 6px; }

  .game-title { font-size: 1.1rem; }
  .play-button { font-size: 1rem; padding: 9px 24px; }

  .screenshot-container img,
  .screenshot-container video { width: 95%; }

  .game-block { padding: 12px 10px; margin-top: 12px; }
  .authors-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
}

/* Very small */
@media (max-width: 360px) {
  .nav-btn { font-size: 0.65rem; padding: 4px 7px; }
  .brand-text h1 { font-size: 1.1rem; }
  .game-title { font-size: 1rem; }
  .play-button { font-size: 0.9rem; padding: 8px 18px; letter-spacing: 1px; }
}
