/* =====================================================================
   Prestoria Lounge — games.css  (страница Gry / demo-казино)
   Подключается только на games.php. Наследует переменные из style.css.
   ===================================================================== */

.page-hero--games::after { background: #e7d7cf; }

/* Плашка-дисклеймер */
.game-disclaimer { background: var(--ink); color: #e8ddcd; }
.game-disclaimer__inner { display: flex; align-items: center; gap: 20px; padding: 18px 0; }
.game-disclaimer p { font-size: .88rem; line-height: 1.6; color: #cabca6; max-width: 100%; margin: 0; }
.game-disclaimer strong { color: #f3ead9; }
.game-disclaimer .link-inline { color: #e9c9b6; text-decoration: underline; background: none; border: none; cursor: pointer; font: inherit; padding: 0; }
.age-badge--lg { font-size: .95rem; padding: 8px 14px; border-width: 1.5px; flex-shrink: 0; }

/* Balance HUD */
.balance-hud { position: sticky; top: 0; z-index: 90; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.balance-hud__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.balance-hud__meter { display: flex; align-items: baseline; gap: 14px; }
.balance-hud__label { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.balance-hud__value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--ink); }
.balance-hud__value.flash { animation: balFlash .5s var(--ease); }
@keyframes balFlash { 0%,100% { color: var(--ink); } 50% { color: var(--accent); transform: scale(1.06); } }
.balance-hud__unit { font-size: .8rem; color: var(--muted); font-family: var(--font-body); font-weight: 400; }

.text-link { color: var(--accent); border-bottom: 1px solid var(--accent); }

/* Каталог */
.games-catalog { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.game-tile {
  display: grid; grid-template-columns: 140px 1fr; text-align: left; gap: 0;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  font: inherit; color: inherit;
}
.game-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }
.game-tile__art { position: relative; overflow: hidden; background: #2f2924; }
.game-tile__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.game-tile:hover .game-tile__art img { transform: scale(1.06); }
.game-tile__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(30,24,20,.15), rgba(30,24,20,.35)); }
.game-tile__body { padding: 24px 26px; display: flex; flex-direction: column; }
.game-tile__tag { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.game-tile__name { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; margin-bottom: 6px; }
.game-tile__desc { font-size: .92rem; color: var(--muted); }
.game-tile__cta { margin-top: 16px; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }

/* Game modal shell */
.modal__panel--game { max-width: 520px; }
.demo-pill { font-family: var(--font-body); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; vertical-align: middle; background: var(--sage); color: #fff; padding: 3px 8px; border-radius: 999px; margin-left: 8px; }
.game-msg { min-height: 44px; font-size: .95rem; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px 14px; margin: 18px 0; text-align: center; }
.game-msg.win { color: #3f6b4b; border-color: #b9d3bf; background: #eef6ef; }
.game-msg.lose { color: #9a4b44; border-color: #e2c4c0; background: #f8efed; }

/* Bet amount chips */
.bet-amount { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.bet-amount > span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chip-select { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-select button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; cursor: pointer; transition: .2s; }
.chip-select button:hover { border-color: var(--accent); }
.chip-select button.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Bet options grid */
.bet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.bet-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bet-opt { padding: 12px 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--ink-soft); transition: .2s; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.bet-opt em { font-style: normal; font-size: .68rem; color: var(--muted); font-weight: 400; }
.bet-opt:hover { border-color: var(--accent); }
.bet-opt.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.bet-opt.is-active em { color: rgba(255,255,255,.75); }
.bet-straight { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; align-items: center; margin-bottom: 18px; }
.bet-straight label { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.bet-straight label em { font-style: normal; color: var(--muted); font-weight: 400; }
.bet-straight input { grid-column: 1; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 1rem; }
.bet-straight input:focus { outline: none; border-color: var(--accent); }
.bet-straight .bet-opt { grid-column: 2; grid-row: 1 / span 2; }

.game-spin[disabled] { opacity: .5; cursor: not-allowed; }
.game-spin.busy { pointer-events: none; opacity: .7; }

/* Roulette wheel */
.roulette { text-align: center; }
.roulette__wheel {
  width: 150px; height: 150px; border-radius: 50%; margin: 6px auto 4px;
  background: conic-gradient(#2a2521 0 25%, #9a2c2c 0 50%, #2a2521 0 75%, #566257 0 100%);
  border: 6px solid var(--gold); display: grid; place-items: center; position: relative;
  transition: transform 2.6s cubic-bezier(.15,.6,.2,1);
}
.roulette__num { width: 78px; height: 78px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; color: var(--ink); }
.roulette__num.red { color: #9a2c2c; } .roulette__num.black { color: #2a2521; } .roulette__num.green { color: #3f6b4b; }

/* Blackjack */
.blackjack { }
.bj-row { margin-bottom: 14px; }
.bj-label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 8px; }
.bj-hand { display: flex; gap: 8px; min-height: 74px; flex-wrap: wrap; }
.bj-hand .card {
  width: 52px; height: 72px; border-radius: 6px; background: #fbf5ea; border: 1px solid #e0d3bd;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  color: #2a2521; box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); animation: deal .3s var(--ease);
}
.bj-hand .card.red { color: #9a2c2c; }
.bj-hand .card.back { background: repeating-linear-gradient(45deg, #5d4147, #5d4147 6px, #6b4c52 6px, #6b4c52 12px); color: transparent; }
@keyframes deal { from { opacity: 0; transform: translateY(-14px) rotate(-6deg); } to { opacity: 1; transform: none; } }
.bj-actions { display: flex; gap: 10px; }
.bj-actions .btn { flex: 1; }

/* Slots */
.slots { text-align: center; }
.slots__reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto 4px; }
.slots__reel { background: var(--ink); border: 2px solid var(--gold); border-radius: var(--radius); height: 92px; overflow: hidden; display: grid; place-items: center; }
.slots__reel span { font-size: 2.6rem; line-height: 1; }
.slots__reel.spinning span { animation: reelspin .12s linear infinite; }
@keyframes reelspin { from { transform: translateY(-8px); opacity: .5; } to { transform: translateY(8px); opacity: 1; } }
.slots__pay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 18px; }
.slots__pay span { font-size: .78rem; color: var(--muted); background: var(--bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 4px; }

/* Dice */
.dice { text-align: center; }
.dice__pair { display: flex; gap: 16px; justify-content: center; margin: 4px 0; }
.dice__die { font-size: 4rem; line-height: 1; color: var(--ink); }
.dice__die.rolling { animation: dieRoll .4s var(--ease); }
@keyframes dieRoll { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }

@media (max-width: 640px) {
  .games-catalog { grid-template-columns: 1fr; }
  .game-tile { grid-template-columns: 100px 1fr; }
  .game-disclaimer__inner { align-items: flex-start; gap: 14px; }
  .bet-grid { grid-template-columns: repeat(2, 1fr); }
  .balance-hud__value { font-size: 1.4rem; }
}
