.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:25px;
  margin-top:40px;
}

.card{
  transition:0.3s;
}

.card:hover{
  transform:translateY(-8px);
  border-color:#facc15;
}

.card h3{
  margin-bottom:15px;
  color:#facc15;
}

/* Accent Variants */

.strategic-card {

    border-left:
        4px solid #c89b3c;
}

.tactical-card {

    border-left:
        4px solid #d9534f;
}

.endgame-card {

    border-left:
        4px solid #5b8def;
}

.attack-card {

    border-left:
        4px solid #ff8c42;
}


.game-card {

    position: relative;

    overflow: hidden;

    border-radius: 20px;

    padding: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(32,32,32,0.98),
            rgba(18,18,18,0.98)
        );

    border:
        1px solid rgba(255,255,255,0.06);

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;

    box-shadow:
        0 10px 28px rgba(0,0,0,0.32);
}

.game-card:hover {

    transform:
        translateY(-8px);

    border-color:
        rgba(200,155,60,0.5);

    box-shadow:
        0 22px 42px rgba(0,0,0,0.45);
}

.game-card a {

    text-decoration: none;

    color: inherit;
}

.about-box,
.card{
  background:#111827;
  padding:35px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,0.05);
}

.about-box p,
.card p{
  color:#cbd5e1;
  line-height:1.8;
}


.stats{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:20px;
}

.stat{
  background:#1e293b;
  padding:30px;
  border-radius:16px;
  text-align:center;
}

.stat h2{
  color:#facc15;
  font-size:2rem;
}

.stat p{
  color:#94a3b8;
  }



.game-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 24px;
}

.game-badges {

    display: flex;

    gap: 10px;
}

.result-badge,
.title-badge,
.elo-badge {

    padding: 7px 14px;

    border-radius: 999px;

    font-size: 0.76rem;

    font-weight: 700;

    letter-spacing: 0.5px;
}

.result-badge.win {

    background:
        rgba(80,200,120,0.16);

    color:
        #6ee08d;
}

.result-badge.draw {

    background:
        rgba(120,140,255,0.15);

    color:
        #9fb2ff;
}

.title-badge.gm {

    background:
        rgba(255,80,80,0.14);

    color:
        #ff9797;
}

.title-badge.im {

    background:
        rgba(95,130,255,0.14);

    color:
        #a7b7ff;
}

.title-badge.fm {

    background:
        rgba(220,170,70,0.16);

    color:
        #f2cb77;
}

.elo-badge {

    background:
        rgba(255,255,255,0.06);

    color:
        rgba(255,255,255,0.72);
}

.game-watermark {

    position: absolute;

    top: 18px;

    right: 20px;

    font-size: 6rem;

    opacity: 0.045;

    pointer-events: none;

    user-select: none;
}

.opening-label {

    display: inline-block;

    margin-bottom: 14px;

    color:
        #c89b3c;

    font-size: 0.82rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;
}

.game-content h3 {

    margin-bottom: 16px;

    font-size: 1.45rem;

    line-height: 1.35;

    color:
        #ffffff;
}

.game-content p {

    color:
        rgba(255,255,255,0.74);

    line-height: 1.75;

    font-size: 0.96rem;
}


.game-tags {

    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 24px;
}

.game-tags span {

    padding: 8px 13px;

    border-radius: 999px;

    background:
        rgba(255,255,255,0.05);

    color:
        rgba(255,255,255,0.72);

    font-size: 0.76rem;
}

.game-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 28px;

    padding-top: 18px;

    border-top:
        1px solid rgba(255,255,255,0.06);

    color:
        rgba(255,255,255,0.55);

    font-size: 0.82rem;
}

/* critical position ("what would you play?") on the strategy pages, board drawn by js/staticBoard.js */
.crit-position { display: flex; flex-wrap: wrap; gap: 30px; align-items: flex-start; justify-content: center; max-width: 1000px; margin: 0 auto; }
.crit-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(440px, 100%); aspect-ratio: 1; flex: 0 0 auto;
              border-radius: 6px; overflow: hidden; box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
.crit-sq { position: relative; }
.crit-sq img { width: 100%; height: 100%; display: block; }
.crit-light { background: #f0d9b5; }
.crit-dark { background: #b58863; }
.crit-sq[data-rank]::before, .crit-sq[data-file]::after { position: absolute; font-size: 0.65rem; font-weight: 600; color: #6b4f33; }
.crit-sq[data-rank]::before { content: attr(data-rank); top: 2px; left: 3px; }
.crit-sq[data-file]::after { content: attr(data-file); bottom: 1px; right: 3px; }
.crit-question { flex: 1 1 320px; max-width: 500px; }
.crit-question .analysis-card { text-align: left; }
.crit-turn { display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px; background: #f5f5f5; color: #111827; font-size: 0.8rem; font-weight: 700; }
.crit-question details { margin-top: 20px; }
.crit-question summary { cursor: pointer; color: #facc15; font-weight: 600; }
.crit-question details p { margin-top: 12px; }
