/* =========================================================
   FONT - INTER
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');


/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    background: #ffffff;
    color: #102a4c;

    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

button,
input,
select,
textarea {
    font-family: 'Inter', sans-serif;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    background: #0b2c53;
    color: #ffffff;
}

.nav-inner {
    max-width: 1280px;
    height: 72px;

    margin: auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 65px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: #ffffff;
    border-radius: 11px;

    padding: 5px;
}

.brand-kpm-logo {
    width: 100%;
    height: 100%;

    object-fit: contain;
    display: block;
}

.brand strong {
    display: block;

    font-size: 15px;
    font-weight: 700;
}

.brand small {
    display: block;

    margin-top: 2px;

    font-size: 11px;

    opacity: .72;
}

.nav-link {
    padding: 9px 15px;

    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;

    color: #ffffff;

    font-size: 12px;
    font-weight: 500;

    text-decoration: none;
}

.nav-link:hover {
    background: rgba(255, 255, 255, .08);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding: 42px 20px 25px;

    text-align: center;
}

.hero h1 {
    margin: 0;

    color: #102a4c;

    font-size: clamp(30px, 4vw, 45px);
    font-weight: 700;

    letter-spacing: -1.3px;
}

.hero p {
    margin: 9px 0 24px;

    color: #667085;

    font-size: 14px;
    font-weight: 400;
}


/* =========================================================
   SEARCH
========================================================= */

.search {
    max-width: 700px;

    margin: auto;

    display: flex;

    border: 1px solid #d0d5dd;
    border-radius: 11px;

    background: #ffffff;

    overflow: hidden;
}

.search:focus-within {
    border-color: #84adcf;

    box-shadow:
        0 0 0 3px
        rgba(11, 79, 138, .08);
}

.search input {
    flex: 1;

    min-width: 0;

    padding: 16px 18px;

    border: 0;
    outline: 0;

    background: transparent;

    color: #344054;

    font-size: 14px;
    font-weight: 400;
}

.search input::placeholder {
    color: #98a2b3;
}

.search button {
    padding: 0 25px;

    border: 0;

    background: #0b2c53;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.search button:hover {
    background: #081f3b;
}


/* =========================================================
   MAIN CONTAINER
========================================================= */

.container {
    max-width: 1280px;

    margin: auto;

    padding: 0 20px 50px;
}


/* =========================================================
   FILTER
========================================================= */

.filter-box {
    margin-bottom: 12px;

    padding: 18px;

    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        auto;

    gap: 15px;

    border: 1px solid #e1e7ef;
    border-radius: 12px;

    background: #ffffff;
}

.filter-box select {
    width: 100%;

    padding: 12px;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    outline: 0;

    background: #ffffff;
    color: #344054;

    font-size: 12px;
    font-weight: 400;
}

.filter-box select:focus {
    border-color: #84adcf;
}

.reset {
    padding: 12px 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d0d5dd;
    border-radius: 8px;

    color: #344054;

    font-size: 12px;
    font-weight: 500;

    text-decoration: none;

    white-space: nowrap;
}

.reset:hover {
    background: #f9fafb;
}

/* =========================================================
   KPI
========================================================= */

.kpis {
    margin: 10px 0 25px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);

    background: #f4f7fb;

    border-radius: 12px;

    overflow: hidden;
}

.kpi {
    position: relative;

    min-width: 0;

    padding: 16px 22px;

    display: flex;
    align-items: center;

    gap: 14px;
}


/* DIVIDER */

.kpi:not(:last-child)::after {
    content: "";

    position: absolute;

    right: 0;
    top: 20%;

    width: 1px;
    height: 60%;

    background: #d5dee9;
}


/* =========================================================
   KPI ICON
========================================================= */

.kpi-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    color: #ffffff;

    font-size: 21px;

    box-shadow:
        0 4px 10px
        rgba(16, 24, 40, .08);
}

.kpi-icon i {
    line-height: 1;
}


/* BLUE */

.kpi-blue {
    background:
        linear-gradient(
            135deg,
            #2f80ed,
            #1769e0
        );
}


/* GREEN */

.kpi-green {
    background:
        linear-gradient(
            135deg,
            #20d67b,
            #06b85e
        );
}


/* PURPLE */

.kpi-purple {
    background:
        linear-gradient(
            135deg,
            #914cff,
            #7134df
        );
}


/* ORANGE */

.kpi-orange {
    background:
        linear-gradient(
            135deg,
            #ffad24,
            #ff8a00
        );
}


/* =========================================================
   KPI TEXT
========================================================= */

.kpi strong {
    display: block;

    margin-bottom: 3px;

    color: #102a4c;

    font-size: 21px;
    font-weight: 700;

    line-height: 1;
}

.kpi small {
    display: block;

    color: #667085;

    font-size: 11px;
    font-weight: 500;

    line-height: 1.3;
}

/* =========================================================
   RESULTS
========================================================= */

.result-count {
    margin-bottom: 12px;

    color: #667085;

    font-size: 12px;
    font-weight: 400;
}


/* =========================================================
   GAME GRID
========================================================= */

.game-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;

    align-items: stretch;
}


/* =========================================================
   GAME CARD
========================================================= */

.game-card {
    display: flex;
    flex-direction: column;
    height: 100%;

    overflow: hidden;

    border: 1px solid #e1e7ef;
    border-radius: 12px;

    background: #ffffff;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.game-card:hover {
    transform: translateY(-3px);

    border-color: #d0d9e5;

    box-shadow:
        0 10px 25px
        rgba(16, 24, 40, .08);
}


/* =========================================================
   THUMBNAIL
========================================================= */

.thumb-wrap {
    aspect-ratio: 16 / 8.5;

    overflow: hidden;

    background: #edf2f7;
}

.thumb {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform .3s ease;
}

.game-card:hover .thumb {
    transform: scale(1.015);
}

.no-thumb {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #98a2b3;

    font-size: 40px;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.card-body {
    flex: 1;

    padding: 14px;

    display: flex;
    flex-direction: column;
}

.game-title {
    margin: 0 0 6px;

    color: #102a4c;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.35;

    letter-spacing: -.15px;
}

.description {
    min-height: 38px;

    margin: 0;

    color: #667085;

    font-size: 12px;
    font-weight: 400;

    line-height: 1.55;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =========================================================
   TAGS
========================================================= */

.tags {
    margin: 10px 0 7px;

    display: flex;
    flex-wrap: wrap;

    gap: 5px;
}

.tag {
    padding: 4px 8px;

    border-radius: 6px;

    background: #eff6ff;
    color: #175cd3;

    font-size: 10px;
    font-weight: 500;

    line-height: 1.2;
}


/* =========================================================
   STANDARD PEMBELAJARAN
========================================================= */

.sp-info {
    margin: 7px 0 9px;

    display: flex;
}

.sp-label {
    padding: 4px 7px;

    display: inline-flex;
    align-items: center;

    border: 1px solid #abefc6;
    border-radius: 5px;

    background: #f0fdf4;
    color: #067647;

    font-size: 10px;
    font-weight: 600;

    line-height: 1.2;
}


/* =========================================================
   GURU
========================================================= */

.teacher {
    margin-top: 7px;

    overflow: hidden;

    color: #475467;

    font-size: 11px;
    font-weight: 500;

    line-height: 1.45;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   SEKOLAH
========================================================= */

.school {
    margin-top: 3px;

    overflow: hidden;

    color: #98a2b3;

    font-size: 10px;
    font-weight: 400;

    line-height: 1.4;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   BOTTOM AREA
========================================================= */

.game-card-bottom {
    margin-top: auto;
}


/* =========================================================
   RATING
========================================================= */

.game-rating-row {
    min-height: 21px;

    margin-top: 12px;

    display: flex;
    align-items: center;

    gap: 5px;
}

.rating-stars {
    display: flex;
    align-items: center;

    gap: 1px;

    flex-shrink: 0;
}

.rating-star {
    color: #d0d5dd;

    font-size: 16px;

    font-weight: 700;

    line-height: 1;
}

.rating-star.filled {
    color: #f5a623;
}

.rating-value {
    margin-left: 4px;

    color: #344054;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.rating-count {
    color: #98a2b3;

    font-size: 11px;
    font-weight: 400;

    white-space: nowrap;
}


/* =========================================================
   GAME STATS
========================================================= */

.game-stats-row {
    margin-top: 9px;
    margin-bottom: 11px;

    display: flex;
    align-items: center;

    gap: 14px;

    color: #667085;

    font-size: 11px;
    font-weight: 500;

    line-height: 1.3;
}

.game-stats-row span {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    white-space: nowrap;
}


/* =========================================================
   PLAY BUTTON
========================================================= */

.play-large {
    width: 100%;

    padding: 10px 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: 1px solid #0b4f8a;
    border-radius: 6px;

    background: #0b4f8a;
    color: #ffffff;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.25;

    text-decoration: none;

    transition:
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

.play-large:hover {
    background: #083d6b;
    color: #ffffff;

    transform: translateY(-1px);

    box-shadow:
        0 4px 10px
        rgba(11, 79, 138, .18);
}

.play-large:active {
    transform: translateY(0);
}

.play.play-large {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.play-icon {
    width: 23px;
    height: 23px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.play-icon i {
    font-size: 9px;
    color: #fff;

    /* optical adjustment sebab ikon play berat ke kiri */
    margin-left: 1px;
}

.play.play-large > span:last-child {
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   EMPTY RESULT
========================================================= */

.empty {
    grid-column: 1 / -1;

    padding: 70px 20px;

    color: #667085;

    font-size: 13px;

    text-align: center;
}


/* =========================================================
   RESPONSIVE - LARGE TABLET
========================================================= */

@media (max-width: 1100px) {

    .game-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 850px) {

    .game-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .filter-box {
        grid-template-columns:
            1fr 1fr;
    }

    .kpis {
        grid-template-columns:
            1fr 1fr;
    }

    .kpi:nth-child(2) {
        border-right: 0;
    }

}


/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 550px) {

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .filter-box {
        padding: 14px;

        grid-template-columns: 1fr;
    }

    .kpis {
        grid-template-columns:
            1fr 1fr;
    }

    .kpi {
        padding: 14px;
    }

    .nav-inner {
        height: 64px;

        padding: 0 12px;
    }

    .nav-link {
        display: none;
    }

    .hero {
        padding:
            30px 12px
            20px;
    }

    .hero h1 {
        font-size: 28px;

        letter-spacing: -.7px;
    }

    .hero p {
        font-size: 13px;
    }

    .search input {
        min-width: 0;

        padding: 14px;
    }

    .search button {
        padding: 0 16px;
    }

    .card-body {
        padding: 14px;
    }

    .game-title {
        font-size: 16px;
    }

    .description {
        font-size: 13px;
    }

    .tag {
        font-size: 11px;
    }

    .sp-label {
        font-size: 11px;
    }

    .teacher {
        font-size: 12px;
    }

    .school {
        font-size: 11px;
    }

    .rating-star {
        font-size: 17px;
    }

    .rating-value {
        font-size: 12px;
    }

    .rating-count {
        font-size: 11px;
    }

    .game-stats-row {
        font-size: 11px;
    }

    .play-large {
        padding: 11px 12px;

        font-size: 12px;
    }

}
/* =========================================================
   SAMAKAN KEDUDUKAN BAHAGIAN BAWAH CARD
   Rating + Dimainkan + Buka Permainan
========================================================= */

/*
 * Pastikan setiap card memenuhi keseluruhan
 * tinggi grid cell.
 */
.game-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/*
 * Thumbnail kekal di bahagian atas.
 */
.thumb-wrap {
    flex-shrink: 0;
}


/*
 * Body mengambil semua ruang yang tinggal.
 */
.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}


/*
 * Tolak rating ke bahagian bawah card.
 *
 * Disebabkan game-rating-row ialah elemen pertama
 * dalam bahagian footer card sekarang, semua elemen
 * selepasnya turut turun:
 *
 * rating
 * jumlah dimainkan
 * button
 */
.game-rating-row {
    margin-top: auto;
}


/*
 * Pastikan button sentiasa sama lebar
 * dan berada selepas statistik.
 */
.play.play-large {
    width: 100%;
    flex-shrink: 0;
}


/*
 * Semua item grid diregangkan
 * mengikut tinggi row.
 */
.game-grid {
    align-items: stretch;
}
/* =========================================================
   RATING + LIKE
========================================================= */

.game-rating-row {
    margin-top: auto;

    min-height: 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}


/* =========================================================
   RATING LEFT
========================================================= */

.rating-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 4px;
}

.rating-stars {
    display: flex;
    align-items: center;

    gap: 1px;

    flex-shrink: 0;
}


/* =========================================================
   LIKE BUTTON
========================================================= */

.like-button {
    flex-shrink: 0;

    min-width: 46px;

    padding: 5px 8px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #667085;

    font-family: 'Inter', sans-serif;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}


.like-button i {
    font-size: 16px;
}


.like-button:hover {
    background: #fff1f3;
    color: #e11d48;
}


.like-button.liked {
    color: #e11d48;
}


.like-button:active {
    transform: scale(.92);
}


/* =========================================================
   LIKE COUNT
========================================================= */

.like-count {
    min-width: 10px;

    text-align: left;

    font-size: 11px;
    font-weight: 600;
}
/* =========================================================
   HERO TITLE + LOGO
========================================================= */

.hero-title {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    margin-bottom: 6px;
}

.hero-title h1 {
    margin: 0;

    font-size: 44px;
    font-weight: 800;
    line-height: 1.1;

    color: #082b59;
}


/* LOGO */

.hero-logo {
    width: 62px;
    height: 62px;

    object-fit: contain;

    flex-shrink: 0;
}


/* SUBTITLE */

.hero-subtitle {
    margin: 0;

    text-align: center;

    font-size: 15px;
    color: #667085;
}
@media (max-width: 600px) {

    .hero-title {
        gap: 9px;
    }

    .hero-logo {
        width: 42px;
        height: 42px;
    }

    .hero-title h1 {
        font-size: 27px;
    }

    .hero-subtitle {
        font-size: 13px;
    }
}
.text-green-gradient {
    background: linear-gradient(
        90deg,
        #059669,
        #10b981,
        #16a34a
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;
}