/* ============================================================
   DOLZHENKO.BEST — AD Ritual Protocol + Games
============================================================ */

.ritual {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(201,161,74,0.10), transparent 70%),
    linear-gradient(180deg, #0a0a0a, #060606);
}
.ritual-body {
  margin: 26px 0 30px;
  max-width: 720px;
}
.ritual-body p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ivory-2);
  margin-bottom: 14px;
}
.ritual-rules {
  list-style: none;
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-faint);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(201,161,74,0.05), rgba(201,161,74,0));
}
.ritual-rules li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line-faint);
  font-size: 14px;
  color: var(--ivory);
  line-height: 1.55;
}
.ritual-rules li:first-child { border-top: 0; }
.ritual-rules .r-dot {
  flex: 0 0 6px;
  width: 6px; height: 6px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
.ritual-emph {
  font-size: 15px;
  color: var(--ivory);
  margin-top: 8px;
}
.ritual-emph strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  font-style: italic;
  color: transparent;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text;
}

.ritual-stamp {
  margin: 38px auto;
  max-width: 460px;
  padding: 26px 20px;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 16px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(201,161,74,0.14), transparent 70%),
    linear-gradient(180deg, #0e0d09, #050505);
  box-shadow: 0 0 30px -10px var(--gold-glow);
  position: relative;
}
.ritual-stamp::before, .ritual-stamp::after {
  content: ''; position: absolute;
  width: 28px; height: 28px;
  border: 1px solid var(--gold);
}
.ritual-stamp::before { top: 10px; left: 10px;     border-right: 0; border-bottom: 0; }
.ritual-stamp::after  { bottom: 10px; right: 10px; border-left: 0;  border-top: 0;    }
.rs-en {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: 0.42em;
  color: var(--gold);
  font-weight: 500;
}
.rs-sub {
  margin-top: 6px;
  font-family: var(--serif); font-style: italic;
  color: var(--ivory-2);
  font-size: 16px;
}
.rs-divider {
  width: 32px; height: 1px;
  background: var(--gold);
  margin: 14px auto;
  opacity: 0.6;
}
.rs-ru {
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.06em;
  font-style: italic;
}

/* ============================================================
   AD GAMES — section cards
============================================================ */
.games-header { margin-top: 50px; }
.g-mini-eyebrow {
  font-size: 10px; letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
}
.games-sub { max-width: 520px; color: var(--ivory-2); }

.games-grid {
  margin-top: 26px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px)  { .games-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (min-width: 1024px) { .games-grid { gap: 28px; } }

.game-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line-faint);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #0e0e0e, #060606);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
  position: relative;
}
.game-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6); }

/* pixel art preview using CSS spans */
.gc-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    repeating-linear-gradient(180deg, #0a0a0a 0 4px, #0d0d0d 4px 8px),
    #0a0a0a;
  border-bottom: 1px solid var(--line-faint);
  image-rendering: pixelated;
  overflow: hidden;
}
/* CAT card */
.gc-art--cat { background: linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 65%, #1a1a1a 65%, #1a1a1a 100%); }
.gc-art--cat .px-road {
  position: absolute; left: 0; right: 0; top: 65%; height: 35%;
  background:
    repeating-linear-gradient(90deg, transparent 0 16px, #f4efe6 16px 24px, transparent 24px 40px) no-repeat;
  background-size: 100% 4px;
  background-position: 0 50%;
}
.gc-art--cat .px-road::before, .gc-art--cat .px-road::after {
  content:''; position: absolute; left: 0; right: 0; height: 2px; background: var(--gold);
}
.gc-art--cat .px-road::before { top: 0; }
.gc-art--cat .px-road::after  { bottom: 0; }
.gc-art--cat .px-car {
  position: absolute; left: 14%; top: 70%;
  width: 42px; height: 18px;
  background: var(--gold);
  box-shadow:
    0 -6px 0 -2px var(--gold-deep),  /* roof shadow */
    -16px 0 0 -7px var(--gold-deep),
    16px 0 0 -7px var(--gold-deep);
}
.gc-art--cat .px-car::before { /* roof */
  content:''; position: absolute; left: 6px; right: 6px; top: -8px; height: 8px;
  background: var(--gold-deep);
}
.gc-art--cat .px-car::after { /* windows split */
  content:''; position: absolute; left: 8px; right: 8px; top: -6px; height: 4px;
  background: #0a0a0a;
}
.gc-art--cat .px-cat {
  position: absolute; left: 62%; top: 73%;
  width: 12px; height: 6px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
}
.gc-art--cat .px-cat::before { /* head */
  content:''; position: absolute; right: -4px; top: -3px; width: 5px; height: 5px;
  background: #0a0a0a; border: 1px solid #2a2a2a;
}
.gc-art--cat .px-cat::after { /* tail */
  content:''; position: absolute; left: -4px; top: -2px; width: 4px; height: 2px;
  background: #0a0a0a;
}
.gc-art--cat .px-btn {
  position: absolute; right: 14px; top: 14px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 0 18px var(--gold-glow), inset 0 0 0 1px var(--gold-soft);
  animation: pxBtnPulse 1.6s var(--ease) infinite;
}
@keyframes pxBtnPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* MAN card */
.gc-art--man { background: linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 70%, #1a1a1a 70%, #1a1a1a 100%); }
.gc-art--man .px-ground {
  position: absolute; left: 0; right: 0; top: 70%; height: 2px;
  background: var(--gold);
}
.gc-art--man .px-ground::after {
  content:''; position: absolute; left: 0; right: 0; top: 8px; height: 1px;
  background: repeating-linear-gradient(90deg, #3a3a3a 0 10px, transparent 10px 16px);
}
.gc-art--man .px-man {
  position: absolute; left: 18%; bottom: 25%;
  width: 10px; height: 18px;
  background: var(--gold);
  box-shadow: 0 -8px 0 -1px var(--gold);
}
.gc-art--man .px-man::before {
  content:''; position: absolute; left: 1px; right: 1px; top: -12px; height: 8px;
  background: var(--gold);
}
.gc-art--man .px-man::after {
  content:''; position: absolute; left: -1px; right: -1px; bottom: -4px; height: 4px;
  background: var(--ivory);
  clip-path: polygon(0 0, 40% 0, 40% 100%, 60% 100%, 60% 0, 100% 0, 100% 100%, 0 100%);
}
.gc-art--man .px-hole {
  position: absolute; right: 18%; bottom: 18%;
  width: 38px; height: 8px;
  background: #1a1a1a;
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
}
.gc-art--man .px-hole::after {
  content: 'AD';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 9px; color: var(--gold);
  font-weight: 600;
}

.gc-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.gc-tag {
  font-size: 10px; letter-spacing: 0.32em; color: var(--gold); text-transform: uppercase;
}
.gc-title {
  font-family: var(--serif); font-size: 26px; color: var(--ivory); line-height: 1.1; margin: 0;
  font-weight: 500;
}
.gc-title-ru {
  font-size: 12px; letter-spacing: 0.04em; color: var(--muted);
}
.gc-desc { font-size: 13.5px; color: var(--ivory-2); line-height: 1.6; margin-top: 4px; }
.gc-body .btn { margin-top: 14px; align-self: flex-start; }

@media (min-width: 1024px) {
  .gc-title { font-size: 30px; }
  .game-card { min-height: 100%; }
}

/* ============================================================
   GAME MODAL
============================================================ */
.game-modal-bg { padding: 0; align-items: stretch; }
.game-modal-bg.show { display: flex; }
.game-modal {
  width: 100%;
  max-width: 720px;
  margin: auto;
  background: linear-gradient(180deg, #0c0c0c, #060606);
  border: 1px solid var(--gold);
  border-radius: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.9), 0 0 50px -8px var(--gold-glow);
  min-height: 100svh;
}
@media (min-width: 760px) {
  .game-modal-bg { padding: 36px; align-items: center; }
  .game-modal {
    min-height: 0;
    border-radius: 20px;
    max-width: 560px;
  }
}
@media (min-width: 1024px) {
  .game-modal { max-width: 640px; }
}

.gm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-faint);
  gap: 16px;
}
.gm-titles { line-height: 1.1; }
.gm-title-en {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.36em;
  color: var(--gold); text-transform: uppercase;
}
.gm-title-ru {
  font-family: var(--serif); font-size: 18px; color: var(--ivory); margin-top: 4px;
}
.gm-meta { display: flex; align-items: center; gap: 16px; }
.gm-score-wrap {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.22em;
  color: var(--muted);
}
.gm-score {
  color: var(--gold); font-family: var(--serif); font-size: 18px; margin-left: 4px;
}
.gm-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-faint);
  color: var(--ivory);
  font-size: 22px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.gm-close:hover { border-color: var(--gold); color: var(--gold); }

.gm-stage {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(201,161,74,0.06), transparent 60%),
    #050505;
  position: relative;
  min-height: 360px;
}

/* ---------- RULES OVERLAY ---------- */
.gm-rules {
  position: absolute;
  inset: 16px;
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--gold);
  border-radius: 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 30px 26px;
  z-index: 8;
  box-shadow: 0 0 40px -10px var(--gold-glow);
  animation: gmRulesIn .35s var(--ease);
}
@keyframes gmRulesIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.gm-rules[hidden] { display: none; }
.gm-rules-title {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 8px;
}
.gm-rules-title::after {
  content: '';
  display: block;
  width: 36px; height: 1px;
  background: var(--gold);
  margin: 12px auto 0;
}
.gm-rules-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ivory);
  max-width: 280px;
  margin: 12px 0 22px;
}
.gm-rules-btn {
  min-width: 160px;
  padding: 14px 28px !important;
}

/* ---------- METAL PUGOVITSA ---------- */
.gm-pugovitsa-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line-faint);
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.2));
}
.gm-pugovitsa-wrap[hidden] { display: none; }
.gm-pugovitsa {
  width: 124px; height: 124px;
  border-radius: 50%;
  border: 3px solid #999;
  background:
    radial-gradient(circle at 32% 28%, #fafafa 0%, #d4d4d4 28%, #9a9a9a 60%, #5a5a5a 85%, #2c2c2c 100%);
  box-shadow:
    inset 0 0 0 2px #c0c0c0,
    inset 0 8px 14px rgba(255,255,255,0.55),
    inset 0 -10px 16px rgba(0,0,0,0.55),
    0 0 28px rgba(255,255,255,0.12),
    0 12px 28px rgba(0,0,0,0.7);
  position: relative;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.gm-pugovitsa::before {
  /* inner indented circle (button face) */
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #efefef, #bdbdbd 50%, #7a7a7a 100%);
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,0.6),
    inset 0 -3px 8px rgba(0,0,0,0.4);
  z-index: 0;
}
.gm-pugovitsa:hover {
  box-shadow:
    inset 0 0 0 2px #d8d8d8,
    inset 0 8px 14px rgba(255,255,255,0.6),
    inset 0 -10px 16px rgba(0,0,0,0.55),
    0 0 36px rgba(255,255,255,0.22),
    0 14px 32px rgba(0,0,0,0.75);
}
.gm-pugovitsa:active {
  transform: scale(.94);
  box-shadow:
    inset 0 0 0 2px #888,
    inset 0 4px 10px rgba(0,0,0,0.35),
    0 4px 12px rgba(0,0,0,0.6);
}
.pug-rivet {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #777 70%, #333);
  box-shadow: inset 0 0 0 1px #2a2a2a, 0 1px 2px rgba(0,0,0,0.6);
  z-index: 2;
}
.pug-r1 { top: 8px;    left: 50%; transform: translateX(-50%); }
.pug-r2 { right: 8px;  top: 50%;  transform: translateY(-50%); }
.pug-r3 { bottom: 8px; left: 50%; transform: translateX(-50%); }
.pug-r4 { left: 8px;   top: 50%;  transform: translateY(-50%); }

.pug-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #1a1a1a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.15;
  z-index: 3;
  pointer-events: none;
}
/* Pulsing aura when active */
.gm-pugovitsa.armed::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.6;
  animation: pugPulse 1.1s var(--ease) infinite;
  pointer-events: none;
}
@keyframes pugPulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0;   }
}

/* Hide gm-action when explicit class set */
.gm-action[hidden] { display: none !important; }

@media (max-width: 760px) {
  .gm-pugovitsa { width: 110px; height: 110px; }
  .gm-pugovitsa::before { inset: 12px; }
  .pug-label { font-size: 11px; }
  .gm-rules-text { font-size: 12.5px; max-width: 260px; }
}
@media (min-width: 1024px) {
  .gm-pugovitsa { width: 140px; height: 140px; }
  .gm-pugovitsa::before { inset: 16px; }
  .pug-label { font-size: 13px; }
}
.gm-stage canvas {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 2 / 3;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 1px solid var(--line-faint);
  background: #0a0a0a;
  border-radius: 6px;
  cursor: pointer;
  touch-action: manipulation;
}

.gm-status {
  padding: 14px 22px;
  text-align: center;
  font-size: 13px;
  color: var(--ivory);
  min-height: 44px;
  border-top: 1px solid var(--line-faint);
  background: rgba(201,161,74,0.04);
}
.gm-status.success { color: var(--gold); }
.gm-status.fail    { color: #d68a8a; }
.gm-status.win     {
  color: transparent;
  background: rgba(201,161,74,0.06);
  font-family: var(--serif); font-style: italic; font-size: 16px;
}
.gm-status.win span {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.gm-controls {
  display: flex; gap: 10px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--line-faint);
}
.gm-controls .btn { flex: 1; }
.gm-action.metal {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep)) !important;
  color: var(--black) !important;
  box-shadow: 0 0 28px var(--gold-glow), inset 0 0 0 1px var(--gold-soft);
  animation: metalPulse 1.2s var(--ease) infinite;
}
@keyframes metalPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* ============================================================
   CREDIT / SIGNATURE
============================================================ */
.credit {
  position: relative;
  background: #050505;
  padding: 30px 22px 38px;
  text-align: center;
  width: 100%;
}
.credit-line {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(520px, 65%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.85;
}
.credit-text {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #b8b2a4;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto;
}
.credit-site {
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  padding: 0 1px;
  white-space: nowrap;
  transition: color .35s var(--ease), text-shadow .35s var(--ease);
}
.credit-site::after {
  content: '';
  position: absolute;
  left: 2px; right: 2px; bottom: -2px;
  height: 1px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(.35);
  transform-origin: left;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.credit-site:hover {
  color: var(--gold-soft);
  text-shadow: 0 0 14px var(--gold-glow);
}
.credit-site:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (max-width: 1023px) {
  .credit { padding: 26px 18px 100px; }   /* clears floating dock */
  .credit-text { font-size: 11.5px; }
}
@media (min-width: 1024px) {
  .credit { padding: 40px 48px 48px; }
  .credit-text { font-size: 13px; }
}
