/* ===== M99 Recent Games Module Styles (H5 & Desktop) ===== */

/* Section wrapper */
.m99-rc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.m99-rc-section .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m99-rc-section .section-head h2 {
  font-size: 16px;
  font-weight: 950;
  letter-spacing: -0.1px;
  color: var(--txt, #f7f4ed);
  display: flex;
  align-items: center;
  gap: 6px;
}
.m99-rc-section .section-head button.m99-rc-clear-btn {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold, #e8b75e);
  padding: 6px 2px;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Horizontal scroll row (identical to .jprow) */
.m99-rc-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.m99-rc-row::-webkit-scrollbar {
  display: none;
}

/* Individual game card (H5 - aligns with .jpcard standards) */
.m99-rc-card {
  position: relative;
  flex: 0 0 114px;
  border-radius: 14px;
  overflow: hidden;
  background: #16110f;
  border: 1px solid rgba(223, 28, 52, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.48);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s;
}
.m99-rc-card:active {
  transform: scale(0.97);
  border-color: var(--gold, #ffd479);
}

/* Thumb wrapper - dark ambient background */
.m99-rc-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, #231618 0%, #0d0a0b 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m99-rc-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s;
  background: transparent;
  color: transparent; /* hides broken alt text artifact across browsers */
  padding: 6px;
}
.m99-rc-card.is-slot .m99-rc-thumb {
  object-fit: cover;
  padding: 0;
}

/* Clean Category Badge in top-right */
.m99-rc-cat {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8px;
  font-weight: 900;
  padding: 1.5px 5px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.3px;
  line-height: 1.1;
  color: #fff;
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}
.m99-rc-cat.slots {
  background: linear-gradient(135deg, #f43a4d, #b3142b);
}
.m99-rc-cat.live {
  background: linear-gradient(135deg, #00bcd4, #008ba3);
}
.m99-rc-cat.fast {
  background: linear-gradient(135deg, #e91e63, #ad1457);
}

/* Hover play overlay */
.m99-rc-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 3;
}
.m99-rc-card:hover .m99-rc-hover {
  opacity: 1;
}
.m99-rc-play {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold, #ffd479);
  color: #000;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Meta info below image */
.m99-rc-meta {
  padding: 6px 8px 8px;
  background: #141110;
}
.m99-rc-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--txt, #f7f4ed);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.m99-rc-sub {
  font-size: 9px;
  color: #9b948b;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m99-rc-prov {
  font-weight: 900;
  color: var(--gold, #ffd479);
  background: rgba(232, 183, 94, 0.12);
  border: 0.5px solid rgba(232, 183, 94, 0.3);
  padding: 0 4px;
  border-radius: 3px;
  font-size: 8px;
  line-height: 1.2;
}
.m99-rc-time {
  font-size: 8.5px;
  color: #888;
}

/* Slots lobby custom placement */
.slots-rc {
  margin: 10px 0 14px;
}

/* ===== Desktop Web Specific Styles ===== */
.desktop-rc-section {
  margin-top: 18px;
  margin-bottom: 22px;
}
.desktop-rc-section .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.desktop-rc-section .section-head h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.desktop-rc-clear-btn {
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 12px;
  color: #999;
  cursor: pointer;
  padding: 4px 12px;
  transition: all 0.2s;
}
.desktop-rc-clear-btn:hover {
  border-color: var(--gold, #ffd479);
  color: var(--gold, #ffd479);
}

.desktop-rc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 1200px) {
  .desktop-rc-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 900px) {
  .desktop-rc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.desktop-rc-card {
  position: relative;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.desktop-rc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(223, 28, 52, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.desktop-rc-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.85;
  background: #0b0b0b;
  overflow: hidden;
}
.desktop-rc-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s;
}
.desktop-rc-card:hover .desktop-rc-thumb {
  transform: scale(1.04);
}

.desktop-rc-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.desktop-rc-card:hover .desktop-rc-hover {
  opacity: 1;
}
.desktop-rc-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e00018;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}
.desktop-rc-card:hover .desktop-rc-play {
  transform: scale(1.1);
}

.desktop-rc-meta {
  padding: 8px 10px 10px;
}
.desktop-rc-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desktop-rc-sub {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.desktop-rc-meta .m99-rc-prov {
  font-weight: 900;
  color: var(--gold, #ffd479);
  background: rgba(232, 183, 94, 0.12);
  border: 0.5px solid rgba(232, 183, 94, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  line-height: 1.2;
}
.desktop-rc-meta .m99-rc-time {
  font-size: 9.5px;
  color: #888;
}

/* Approved provider art must retain the complete face/logo inside existing cards.
   Specific game thumbnails keep their original cover/hover behavior. */
.m99-rc-card.is-slot .m99-rc-thumb[src*="assets/prov/gr-monkey-king-20260915.webp"],
.m99-rc-card.is-slot .m99-rc-thumb[src*="assets/prov/slots-"],
.desktop-rc-thumb[src*="assets/live-casino/v5-20260915/"],
.desktop-rc-thumb[src*="assets/prov/gr-monkey-king-20260915.webp"],
.desktop-rc-thumb[src*="assets/prov/slots-"] {
  object-fit: contain;
}
.desktop-rc-card:hover .desktop-rc-thumb[src*="assets/live-casino/v5-20260915/"],
.desktop-rc-card:hover .desktop-rc-thumb[src*="assets/prov/gr-monkey-king-20260915.webp"],
.desktop-rc-card:hover .desktop-rc-thumb[src*="assets/prov/slots-"] {
  transform: none;
}
