/* ============================================================
   Simulations Listing Page — Adapted from Gamify games.css
   Themed for MechDem (violet #421F6F / yellow #FFB907 / Poppins)
   ============================================================ */

:root {
    --purple: #421F6F;
    --yellow: #FFB907;
    --ink: #1c1330;
}

/* ==== Hero Section ==== */
.sims-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 400px;
}

.sims-hero::before {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    pointer-events: none;
}

/* Heading */
.sims-hero h1 {
    color: white;
}

.sims-hero p {
    color: white;
}

/* Sparkle chips */
.stat-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .6rem;
    border-radius: 2rem;
    background: #fff;
    border: 1px solid rgba(66,31,111,.15);
    box-shadow: 0 2px 0 rgba(66,31,111,.06);
    font-weight: 500;
    font-size: .95rem;
    color: var(--ink);
}

.stat-chip .dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255,185,7,.22);
}

/* Breadcrumb */
.breadcrumb-link {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

/* Search & Utility */
.searchbox {
    border-radius: 999px;
    padding-left: 1.2rem;
    border: 1px solid rgba(66,31,111,.18);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.searchbox:focus {
    outline: 3px solid rgba(255,185,7,.55);
    outline-offset: 2px;
    box-shadow: none;
    border-color: var(--yellow);
}

.form-select.gray {
    border: 1px solid rgba(66,31,111,.18);
    border-radius: .5rem;
}

.form-select.gray:focus {
    outline: 3px solid rgba(255,185,7,.55);
    outline-offset: 2px;
    box-shadow: none;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ==== Simulations Grid Section ==== */
.sims-section {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
}

/* Header */
.sims-header h2 {
    color: var(--purple);
    font-weight: 600;
    letter-spacing: .2px;
}

/* Card */
.sim-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(66,31,111,.08);
    transition: transform .25s ease, box-shadow .25s ease;
    background: #fff;
}

.sim-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(66,31,111,.16);
}

/* Thumbnail */
.thumb-wrap {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

#sims-subtitle {
    font-size: larger;
    /* font-weight: 600; */
    margin-bottom: 1rem;
}

.thumb-wrap img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform .35s ease;
}

.sim-card:hover .thumb-wrap img {
    transform: scale(1.06);
}

/* Subject badge */
.badge-subject {
    font-weight: 500;
    letter-spacing: .2px;
    border: 0;
    background: var(--purple);
    color: #fff;
    font-size: .8rem;
}

/* "NEW" badge */
.badge-new {
    background: var(--yellow);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,.15);
}

/* Card title */
.sim-card .h6 {
    font-weight: 600;
    color: var(--purple);
    font-size: 1rem;
}

/* Card description */
.sim-desc {
    font-size: .88rem;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Launch button */
.btn-launch {
    background: linear-gradient(135deg, var(--purple) 0%, #5a2d99 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: .95rem;
    border-radius: 999px;
    padding: .6rem 1.1rem;
    border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-launch:hover,
.btn-launch:focus {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 8px 20px rgba(66,31,111,.35);
    background: transparent;
    color: var(--purple);
    border: 2px solid var(--purple);
}

.btn-launch:focus {
    outline: 3px solid rgba(255,185,7,.6);
    outline-offset: 2px;
}

/* Skeleton loading */
.skeleton {
    border-radius: 1rem;
    overflow: hidden;
    background: #f3edff;
    position: relative;
    min-height: 320px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Empty state */
.empty-state {
    text-align: center;
    color: #3b2b62;
    padding: 3rem 1rem;
    border: 2px dashed rgba(66,31,111,.15);
    border-radius: 1rem;
}

/* Error state */
.error-state {
    background: #fff4f4;
    border: 1px solid #ffd7d7;
    color: #7a1020;
    padding: 1rem;
    border-radius: .75rem;
}

/* Responsive tweaks */
@media (min-width: 768px) {
    .text-md-start { text-align: left !important; }
}

@media (min-width: 1200px) {
    .thumb-wrap img { height: 200px; }
}

@media (max-width: 575.98px) {
    .thumb-wrap img { height: 170px; }

    .sims-hero h1 {
        font-size: 2rem;
    }

    .stat-chip {
        font-size: .85rem;
    }
}
