﻿.game-main {
  padding: clamp(42px, 8vw, 84px) 0 70px;
}

.game-shell {
  display: grid;
  gap: 18px;
}

.game-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.game-head h1 {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 0.9;
}

.game-head h1 span {
  color: var(--accent);
}

.game-head p {
  color: #c7d7f3;
  max-width: 70ch;
  line-height: 1.45;
}

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

.status-pill {
  border-radius: 999px;
  border: 1px solid rgba(131, 180, 255, 0.35);
  background: rgba(12, 23, 49, 0.86);
  padding: 9px 13px;
  color: #cfe0ff;
  font-size: 0.85rem;
}

.status-pill strong {
  color: var(--gold);
}

.game-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
}

.game-area,
.game-side {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(128, 176, 255, 0.26);
  background: linear-gradient(162deg, rgba(14, 24, 51, 0.92), rgba(8, 16, 36, 0.93));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.game-area {
  padding: 16px;
}

.game-side {
  padding: 16px;
}

.side-title {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.combat-log {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 6px;
}

.log-item {
  border-radius: 10px;
  border: 1px solid rgba(128, 176, 255, 0.2);
  background: rgba(7, 14, 31, 0.85);
  color: #cfdefa;
  padding: 9px 10px;
  font-size: 0.92rem;
}

.log-item.crit {
  border-color: rgba(255, 207, 112, 0.5);
  color: #ffe6b4;
}

.duel-stage {
  display: grid;
  gap: 13px;
}

.rune-art-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.rune-art-card {
  border-radius: 14px;
  border: 1px solid rgba(129, 177, 255, 0.28);
  background: linear-gradient(150deg, rgba(14, 25, 51, 0.94), rgba(10, 17, 36, 0.94));
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.rune-art-card::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -20%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 227, 255, 0.16), transparent 70%);
}

.rune-art-card.shadow::before {
  left: auto;
  right: -20%;
  background: radial-gradient(circle, rgba(255, 75, 110, 0.18), transparent 70%);
}

.rune-svg {
  width: 100%;
  height: 110px;
  display: block;
}

.rune-art-card p {
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.73rem;
  color: #b6c8ea;
}

.rune-art-card.guardian .rune-svg {
  animation: runeFloat 6.6s ease-in-out infinite;
}

.rune-art-card.shadow .rune-svg {
  animation: runeFloat 7.2s ease-in-out infinite reverse;
}

.rune-art-card .rune-svg circle,
.rune-art-card .rune-svg polygon {
  animation: runePulse 2.8s ease-in-out infinite;
}

.rune-art-card .rune-svg path {
  filter: drop-shadow(0 0 7px rgba(129, 230, 255, 0.24));
}

.rune-art-card.shadow .rune-svg path {
  filter: drop-shadow(0 0 7px rgba(255, 133, 165, 0.24));
}

.duelist {
  border-radius: 16px;
  border: 1px solid rgba(129, 177, 255, 0.25);
  background: rgba(10, 19, 40, 0.88);
  padding: 14px;
  position: relative;
  overflow: hidden;
}

.duelist::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -30%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(52, 227, 255, 0.16), transparent 68%);
}

.duelist.enemy::before {
  left: auto;
  right: -30%;
  background: radial-gradient(circle, rgba(255, 75, 110, 0.16), transparent 68%);
}

.duelist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.duelist-name {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}

.duelist-role {
  color: #a9bfeb;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hp-wrap {
  margin-bottom: 8px;
}

.hp-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #bdd0f3;
  margin-bottom: 5px;
}

.hp-bar {
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(132, 181, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hp-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f05d79, #ff7b92);
  transition: width 0.35s ease;
}

.energy-bar span {
  background: linear-gradient(90deg, #22b7d4, #34e3ff);
}

.duelist-hit {
  animation: hitFlash 0.25s ease;
}

.damage-float {
  position: absolute;
  right: 18px;
  top: 20px;
  color: #ffd28a;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 210, 138, 0.5);
  animation: floatDamage 0.7s ease forwards;
  pointer-events: none;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-top: 12px;
}

.action-card {
  border-radius: 12px;
  border: 1px solid rgba(132, 181, 255, 0.4);
  background: linear-gradient(145deg, rgba(29, 45, 84, 0.96), rgba(15, 28, 56, 0.96));
  padding: 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  min-height: 130px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.action-card:hover:not([disabled]) {
  transform: translateY(-3px);
  border-color: rgba(151, 205, 255, 0.82);
  box-shadow: 0 14px 20px rgba(0, 0, 0, 0.3);
}

.action-card[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-card h3 {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(141, 192, 255, 0.5);
  display: inline-grid;
  place-items: center;
  margin-bottom: 8px;
  background: linear-gradient(145deg, rgba(40, 62, 116, 0.94), rgba(16, 31, 62, 0.94));
  color: #d6e8ff;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.06);
}

.action-icon svg {
  width: 22px;
  height: 22px;
}

.action-icon.strike {
  border-color: rgba(255, 138, 160, 0.6);
  color: #ffd3dc;
  background: linear-gradient(145deg, rgba(110, 36, 58, 0.9), rgba(48, 20, 33, 0.92));
}

.action-icon.shield {
  border-color: rgba(139, 231, 255, 0.62);
  color: #d2f9ff;
  background: linear-gradient(145deg, rgba(18, 90, 120, 0.9), rgba(12, 39, 64, 0.92));
}

.action-icon.focus {
  border-color: rgba(255, 219, 132, 0.62);
  color: #ffefc4;
  background: linear-gradient(145deg, rgba(104, 78, 28, 0.9), rgba(43, 31, 14, 0.92));
}

.action-card p {
  color: #c6d7f3;
  font-size: 0.88rem;
  line-height: 1.35;
}

.action-card small {
  display: block;
  margin-top: 8px;
  color: #9fb5df;
  font-size: 0.8rem;
}

.banner-result {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(137, 185, 255, 0.33);
  background: rgba(10, 18, 38, 0.82);
  padding: 11px 12px;
  color: #cdddf8;
  line-height: 1.4;
  min-height: 46px;
}

.banner-result strong {
  color: var(--accent);
}

.reels-wrap {
  border-radius: 16px;
  border: 1px solid rgba(140, 182, 255, 0.28);
  background: linear-gradient(165deg, #1d2547, #0d172f 50%, #2f2011);
  padding: 16px;
}

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

.reels-top h2 {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 2rem;
}

.reels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reel {
  border-radius: 12px;
  border: 1px solid rgba(255, 214, 133, 0.35);
  background: rgba(10, 15, 31, 0.92);
  height: 250px;
  overflow: hidden;
  position: relative;
}

.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 3;
  pointer-events: none;
}

.reel::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(7, 12, 25, 0.96), rgba(7, 12, 25, 0));
}

.reel::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(7, 12, 25, 0.96), rgba(7, 12, 25, 0));
}

.reel-track {
  transition: transform 0.7s cubic-bezier(0.2, 0.76, 0.21, 0.99);
}

.symbol {
  height: 82px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #ffeab8;
}

.win-line {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 84px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 217, 130, 0.5);
  border-radius: 9px;
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(255, 214, 123, 0.2);
  z-index: 4;
}

.reels-controls {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bet-box {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bet-box label {
  color: #d8e4ff;
  font-size: 0.9rem;
}

.bet-input {
  width: 120px;
}

.win-flash {
  animation: winPulse 0.85s ease;
}

.spark-zone {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 6px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(#ffe08a, #ff8f66);
  animation: sparkFly 0.9s ease forwards;
}

.memory-wrap {
  border-radius: 16px;
  border: 1px solid rgba(130, 178, 255, 0.28);
  background: linear-gradient(162deg, #1f1744, #0d1633 50%, #102240);
  padding: 16px;
}

.memory-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.memory-head h2 {
  font-family: "Teko", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 2rem;
}

.combo-indicator {
  border-radius: 999px;
  padding: 7px 11px;
  border: 1px solid rgba(132, 180, 255, 0.36);
  color: #d8e4ff;
  background: rgba(10, 19, 42, 0.84);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-card {
  perspective: 820px;
  height: 122px;
  width: 100%;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: block;
}

.memory-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.42s ease;
}

.memory-card.flipped .memory-inner,
.memory-card.matched .memory-inner {
  transform: rotateY(180deg);
}

.memory-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px solid rgba(131, 179, 255, 0.28);
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}

.memory-front {
  background: linear-gradient(140deg, rgba(35, 53, 101, 0.96), rgba(14, 25, 53, 0.96));
  color: #9ec8ff;
  font-size: 2rem;
}

.memory-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, rgba(36, 19, 65, 0.95), rgba(13, 32, 66, 0.95));
  color: #ffe19c;
  font-size: 2.1rem;
}

.memory-card.matched .memory-back {
  box-shadow: inset 0 0 0 1px rgba(114, 230, 164, 0.55), 0 0 20px rgba(114, 230, 164, 0.32);
}

.memory-card:disabled {
  cursor: default;
}

.memory-footer {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes hitFlash {
  0% {
    box-shadow: inset 0 0 0 rgba(255, 95, 125, 0);
  }
  40% {
    box-shadow: inset 0 0 0 999px rgba(255, 95, 125, 0.18);
  }
  100% {
    box-shadow: inset 0 0 0 rgba(255, 95, 125, 0);
  }
}

@keyframes floatDamage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-30px);
  }
}

@keyframes winPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 214, 133, 0);
  }
  40% {
    box-shadow: 0 0 0 999px rgba(255, 214, 133, 0.07);
  }
}

@keyframes sparkFly {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.8);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-120px) rotate(18deg) scale(1.2);
  }
}

@keyframes runeFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes runePulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .action-row {
    grid-template-columns: 1fr;
  }

  .rune-art-gallery {
    grid-template-columns: 1fr;
  }

  .memory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .reel {
    height: 210px;
  }

  .symbol {
    height: 68px;
  }
}

@media (max-width: 520px) {
  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
