:root{
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --secondary-color: #22d3ee;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --border-color: #475569;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));

  --mc-gap: 20px;
  --mc-media-h: 220px;
  --mc-radius: 16px;
}

/* Page/container helpers */
.mc-container{
  max-width: 1420px; /* matches your new page width */
  margin: 0 auto;
  padding: 0 10px;
}

/* Responsive row using flex + gap */
.mc-row{
  display:flex;
  flex-wrap:wrap;
  gap: var(--mc-gap);
}

/* 4 / 3 / 2 / 1 columns via calc widths */
@media (min-width: 1400px){
  .mc-col{ flex: 0 0 calc((100% - (3 * var(--mc-gap))) / 4); }
}
@media (min-width: 1024px) and (max-width: 1399.98px){
  .mc-col{ flex: 0 0 calc((100% - (2 * var(--mc-gap))) / 3); }
}
@media (min-width: 600px) and (max-width: 1023.98px){
  .mc-col{ flex: 0 0 calc((100% - var(--mc-gap)) / 2); }
}
@media (max-width: 599.98px){
  .mc-col{ flex: 0 0 100%; }
}

/* ---- Card ---- */
.mc-card{
  display:flex;
  flex-direction:column;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--mc-radius);
  overflow:hidden;
  height:100%;
  min-height: 360px;
  box-shadow: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mc-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.mc-card:focus-within{ outline:3px solid var(--secondary-color); outline-offset:2px; }

/* Media — fixed height for tidy rows */
.mc-media{
  position: relative;
  display:block;
  width:100%;
  aspect-ratio: var(--mc-media-ratio, 3 / 2); /* unified frame: 3:2 */
  background: var(--bg-card);
  overflow:hidden;
  --mc-pos-x: 50%; /* focal point defaults */
  --mc-pos-y: 0%;  /* top-align by default */
}

/* Optional ratio helpers */
.mc-media.ratio-32{ --mc-media-ratio: 3 / 2; }
.mc-media.ratio-11{ --mc-media-ratio: 1 / 1; }


.mc-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;                 /* fill frame, no gaps */
  object-position: var(--mc-pos-x) var(--mc-pos-y); /* focal control */
  transition: transform .45s ease;
}


.mc-card:hover .mc-media img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;                 /* fill frame, no gaps */
  object-position: var(--mc-pos-x) var(--mc-pos-y); /* focal control */
  transition: transform .45s ease;
}



/* Body becomes a flex column so the button can pin to bottom */
.mc-body{
  display:flex;
  flex-direction:column;
  flex: 1 1 auto;
  padding: 16px;
  color: var(--text-primary);
}

/* Title/desc/meta */
.mc-title{
  margin:0 0 6px;
  font: 700 16px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text-primary);
}
.mc-desc{
  margin:0 0 10px;
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text-secondary);
}
.mc-desc.mc-clamp-3{
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}

.mc-meta{
  display:flex; gap:8px; flex-wrap:wrap; margin:0 0 10px;
  font: 12px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text-secondary);
}
.mc-tag{ text-transform: uppercase; letter-spacing: .03em; opacity: .9; }

/* Button pinned at bottom */
.mc-btn{
  margin-top:auto;
  align-self:center;
  width:100%;
  padding:.9rem 1rem;
  background: var(--gradient);
  color:#fff;
  border:none;
  border-radius: 10px;
  font: 700 15px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  cursor:pointer;
  transition: opacity .2s ease, transform .2s ease;
}

/* this may be in conflict with modal-game-v5 css */

.play-button{
  margin-top:auto;
  align-self:center;
  width:100%;
  padding:.9rem 1rem;
  background: var(--gradient);
  color:#fff;
  border:none;
  border-radius: 10px;
  font: 700 15px/1 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  cursor:pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.play-button:hover{ opacity:.92; transform: translateY(-1px); }
.play-button:focus-visible{ outline:3px solid var(--secondary-color); outline-offset:2px; }

.mc-btn:hover{ opacity:.92; transform: translateY(-1px); }
.mc-btn:active{ transform: translateY(0); }  /* typo intentionally fixed below */
.mc-btn:focus-visible{ outline:3px solid var(--secondary-color); outline-offset:2px; }

/* Optional: compact variant */
.mc-card.compact{ --mc-media-h: 200px; min-height: 330px; }

/* Links inside the card */
.mc-card a {
  color: #ffffff;                       /* strong contrast on #818cf8 */
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.65);
  transition: color .2s ease, text-decoration-color .2s ease;
  outline: none;                        /* we'll handle focus below */
}

.mc-card a:hover,
.mc-card a:focus {
  color: #e0e7ff;                       /* gentle lift on hover/focus */
  text-decoration-color: #e0e7ff;
}

.mc-card a:active {
  color: #c7d2fe;                       /* pressed state */
}

.mc-card a:visited {
  color: #f5f3ff;                       /* distinguish without ugly purple */
}

/* Keyboard focus you can actually see */
.mc-card a:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 2px;                   /* helps the outline look clean */
}

/* Motion-sensitive users */
@media (prefers-reduced-motion: reduce) {
  .mc-card a { transition: none; }
}


/* Optional: focal helpers */
.pos-top   { --mc-pos-y: 0%; }
.pos-center{ --mc-pos-y: 50%; }
.pos-bottom{ --mc-pos-y: 100%; }
.pos-left  { --mc-pos-x: 0%; }
.pos-right { --mc-pos-x: 100%; }

/* If you absolutely need a different frame height on a specific card */
.ratio-43 { --mc-media-ratio: 4 / 3; }

.buttonspace {padding-top:12px; padding-bottom: 0;}

.play-button-2 {margin-top:12px; margin-bottom:12px; }

.addborder {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border:none;
}

.addborder picture { display: block; }
.addborder img { display: block; width: 100%; height: auto; border:none; border-left:-10px; }

