/* ==========================================
   STKC Learning Games Portal
   style.css (Part 1)
========================================== */

/* ---------- Google Material Color ---------- */

:root{

    --primary:#1565C0;
    --primary-dark:#0D47A1;
    --primary-light:#E3F2FD;

    --secondary:#26A69A;

    --background:#F5F7FB;

    --surface:#FFFFFF;

    --text:#263238;

    --text-light:#607D8B;

    --border:#E0E0E0;

    --shadow:0 6px 20px rgba(0,0,0,.08);

    --shadow-hover:0 15px 35px rgba(0,0,0,.15);

    --radius:18px;

    --transition:.30s ease;

}


/* ---------- Dark Theme ---------- */

body.dark{

    --background:#121212;

    --surface:#1E1E1E;

    --text:#FAFAFA;

    --text-light:#BDBDBD;

    --border:#333;

    --shadow:0 8px 20px rgba(0,0,0,.35);

}


/* ---------- Reset ---------- */

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}


html{

    scroll-behavior:smooth;

}


body{

    font-family:'Prompt',sans-serif;

    background:var(--background);

    color:var(--text);

    transition:background .3s,color .3s;

}


/* ---------- Container ---------- */

.container{

    width:min(1200px,92%);

    margin:auto;

}


/* ---------- Links ---------- */

a{

    text-decoration:none;

    color:inherit;

}


/* ---------- Images ---------- */

img{

    max-width:100%;

    display:block;

}


/* ==========================================
                HEADER
========================================== */

.topbar{

    position:sticky;

    top:0;

    z-index:999;

    height:74px;

    background:var(--surface);

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 30px;

    box-shadow:0 2px 8px rgba(0,0,0,.06);

}


.logo-section{

    display:flex;

    align-items:center;

    gap:15px;

}


.logo{

    width:52px;

    height:52px;

}


.logo-section h2{

    font-size:22px;

    color:var(--primary);

}


.logo-section p{

    color:var(--text-light);

    font-size:14px;

}


.icon-btn{

    width:46px;

    height:46px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    background:transparent;

    transition:.25s;

}


.icon-btn:hover{

    background:var(--primary-light);

}


.icon-btn .material-icons{

    font-size:26px;

    color:var(--primary);

}


/* ==========================================
                HERO
========================================== */

.hero{

    background:linear-gradient(135deg,#1565C0,#1E88E5);

    color:white;

    padding:80px 20px;

    text-align:center;

}


.hero h1{

    font-size:48px;

    font-weight:700;

    margin-bottom:18px;

}


.hero p{

    font-size:20px;

    opacity:.95;

    margin-bottom:35px;

}


/* ---------- Search ---------- */

.hero-search{

    width:min(700px,95%);

    margin:auto;

    background:white;

    border-radius:60px;

    display:flex;

    align-items:center;

    padding:0 20px;

    box-shadow:0 12px 25px rgba(0,0,0,.18);

}


.hero-search span{

    color:#888;

    margin-right:10px;

}


.hero-search input{

    flex:1;

    border:none;

    outline:none;

    height:60px;

    font-size:18px;

    font-family:inherit;

    background:none;

}


/* ==========================================
            FEATURE CARD
========================================== */

.featured{

    margin-top:-45px;

    margin-bottom:40px;

}


.featured .container{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:25px;

}


.feature-card{

    background:var(--surface);

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:28px;

    text-align:center;

    transition:var(--transition);

}


.feature-card:hover{

    transform:translateY(-8px);

    box-shadow:var(--shadow-hover);

}


.feature-card .material-icons{

    font-size:48px;

    color:var(--primary);

    margin-bottom:15px;

}


.feature-card h3{

    font-size:28px;

    color:var(--primary);

    margin-bottom:5px;

}


.feature-card p{

    color:var(--text-light);

}


/* ==========================================
          SECTION TITLE
========================================== */

.section-title{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:25px;

}


.section-title h2{

    font-size:34px;

    color:var(--text);

    font-weight:600;

}


/* ==========================================
          Utility
========================================== */

.hidden{

    display:none;

}

.fade{

    animation:fade .4s;

}

@keyframes fade{

    from{

        opacity:0;

        transform:translateY(15px);

    }

    to{

        opacity:1;

        transform:none;

    }

}

/* ==========================================
        CATEGORY (Material Chips)
========================================== */

.category{

    margin-bottom:45px;

}

.category .container{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

}

.chip{

    padding:10px 20px;

    border:1px solid var(--border);

    background:var(--surface);

    color:var(--text);

    border-radius:30px;

    cursor:pointer;

    font-family:inherit;

    font-size:15px;

    transition:var(--transition);

}

.chip:hover{

    background:var(--primary-light);

    color:var(--primary);

    border-color:var(--primary);

}

.chip.active{

    background:var(--primary);

    color:#fff;

    border-color:var(--primary);

}


/* ==========================================
            GAME SECTION
========================================== */

.games-section{

    padding-bottom:70px;

}

.games-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));

    gap:28px;

}


/* ==========================================
            MATERIAL CARD
========================================== */

.card{

    background:var(--surface);

    border-radius:20px;

    overflow:hidden;

    box-shadow:var(--shadow);

    transition:var(--transition);

    display:flex;

    flex-direction:column;

}

.card:hover{

    transform:translateY(-10px);

    box-shadow:var(--shadow-hover);

}


.card-image{

    width:100%;

    height:220px;

    overflow:hidden;

    background:#ECEFF1;

}

.card-image img{

    width:100%;

    height:100%;

    object-fit:cover;

    transition:.45s;

}

.card:hover .card-image img{

    transform:scale(1.08);

}


/* ==========================================
            CARD CONTENT
========================================== */

.card-content{

    padding:22px;

    display:flex;

    flex-direction:column;

    flex:1;

}

.card-title{

    font-size:22px;

    font-weight:600;

    margin-bottom:12px;

    color:var(--text);

    line-height:1.4;

}

.card-description{

    color:var(--text-light);

    line-height:1.8;

    margin-bottom:18px;

    flex:1;

}


/* ==========================================
            BADGE
========================================== */

.badge{

    display:inline-block;

    align-self:flex-start;

    padding:6px 14px;

    border-radius:20px;

    background:var(--primary-light);

    color:var(--primary);

    font-size:13px;

    font-weight:600;

    margin-bottom:14px;

}


/* ==========================================
            INFO ROW
========================================== */

.card-info{

    display:flex;

    justify-content:space-between;

    gap:15px;

    margin-bottom:18px;

    color:var(--text-light);

    font-size:14px;

}

.info-item{

    display:flex;

    align-items:center;

    gap:5px;

}

.info-item .material-icons{

    font-size:18px;

}


/* ==========================================
            BUTTONS
========================================== */

.card-buttons{

    display:flex;

    gap:10px;

}

.btn{

    flex:1;

    padding:12px;

    border-radius:10px;

    border:none;

    cursor:pointer;

    font-family:inherit;

    font-size:15px;

    text-align:center;

    transition:var(--transition);

}


.btn-detail{

    background:#ECEFF1;

    color:#455A64;

}

.btn-detail:hover{

    background:#CFD8DC;

}


.btn-play{

    background:var(--primary);

    color:white;

}

.btn-play:hover{

    background:var(--primary-dark);

}


/* ==========================================
            FOOTER
========================================== */

footer{

    margin-top:60px;

    background:var(--surface);

    border-top:1px solid var(--border);

    padding:35px 0;

}

.footer-content{

    display:flex;

    align-items:center;

    gap:20px;

}

.footer-content h3{

    color:var(--primary);

    margin-bottom:5px;

}

.footer-content p{

    color:var(--text-light);

    margin-bottom:8px;

}

.footer-content small{

    color:var(--text-light);

}


/* ==========================================
        FLOATING BUTTON
========================================== */

.scrollTop{

    position:fixed;

    right:25px;

    bottom:25px;

    width:56px;

    height:56px;

    border:none;

    border-radius:50%;

    background:var(--primary);

    color:#fff;

    cursor:pointer;

    display:none;

    justify-content:center;

    align-items:center;

    box-shadow:0 10px 25px rgba(0,0,0,.25);

    transition:var(--transition);

}

.scrollTop:hover{

    background:var(--primary-dark);

    transform:translateY(-4px);

}

.scrollTop.show{

    display:flex;

}

.scrollTop .material-icons{

    font-size:28px;

}


/* ==========================================
            LOADING CARD
========================================== */

.skeleton{

    height:380px;

    border-radius:20px;

    background:linear-gradient(
        90deg,
        #ECEFF1 25%,
        #F5F5F5 50%,
        #ECEFF1 75%
    );

    background-size:200% 100%;

    animation:skeleton-loading 1.3s infinite;

}

@keyframes skeleton-loading{

    from{

        background-position:200% 0;

    }

    to{

        background-position:-200% 0;

    }

}

/* ==========================================
        MODAL
========================================== */

.modal{

    display:none;

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.55);

    z-index:9999;

    justify-content:center;

    align-items:center;

    padding:20px;

    animation:fadeIn .3s;

}

.modal.show{

    display:flex;

}

.modal-content{

    width:min(700px,100%);

    background:var(--surface);

    border-radius:20px;

    overflow:hidden;

    box-shadow:0 20px 50px rgba(0,0,0,.25);

    animation:slideUp .35s;

}

.close{

    float:right;

    padding:20px;

    font-size:32px;

    cursor:pointer;

    color:var(--text-light);

}

.close:hover{

    color:var(--primary);

}

#modalBody{

    padding:30px;

}

#modalBody img{

    width:100%;

    border-radius:15px;

    margin-bottom:20px;

}

#modalBody h2{

    margin-bottom:15px;

}

#modalBody p{

    line-height:1.8;

    color:var(--text-light);

}


/* ==========================================
        ANIMATION
========================================== */

@keyframes fadeIn{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

@keyframes slideUp{

    from{

        transform:translateY(40px);

        opacity:0;

    }

    to{

        transform:translateY(0);

        opacity:1;

    }

}

@keyframes zoom{

    from{

        transform:scale(.95);

    }

    to{

        transform:scale(1);

    }

}


/* ==========================================
        RIPPLE EFFECT
========================================== */

.btn{

    position:relative;

    overflow:hidden;

}

.btn::after{

    content:"";

    position:absolute;

    width:0;

    height:0;

    border-radius:50%;

    background:rgba(255,255,255,.35);

    left:50%;

    top:50%;

    transform:translate(-50%,-50%);

    transition:.45s;

}

.btn:active::after{

    width:250px;

    height:250px;

}


/* ==========================================
        SCROLLBAR
========================================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:var(--background);

}

::-webkit-scrollbar-thumb{

    background:var(--primary);

    border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--primary-dark);

}


/* ==========================================
        DARK MODE
========================================== */

body.dark .hero{

    background:linear-gradient(135deg,#0D47A1,#1565C0);

}

body.dark .hero-search{

    background:#2C2C2C;

}

body.dark .hero-search input{

    color:white;

}

body.dark .hero-search input::placeholder{

    color:#BBB;

}

body.dark .chip{

    background:#2A2A2A;

}

body.dark .btn-detail{

    background:#333;

    color:white;

}

body.dark .btn-detail:hover{

    background:#444;

}

body.dark .scrollTop{

    box-shadow:0 10px 25px rgba(0,0,0,.5);

}


/* ==========================================
        RESPONSIVE
========================================== */

@media(max-width:992px){

.topbar{

    padding:15px 20px;

}

.hero{

    padding:70px 20px;

}

.hero h1{

    font-size:36px;

}

.hero p{

    font-size:18px;

}

.featured .container{

    grid-template-columns:repeat(2,1fr);

}

.games-grid{

    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));

}

}


@media(max-width:768px){

.topbar{

    height:auto;

    flex-direction:column;

    gap:15px;

    padding:20px;

}

.logo-section{

    flex-direction:column;

    text-align:center;

}

.hero{

    padding:60px 20px;

}

.hero h1{

    font-size:30px;

}

.hero p{

    font-size:16px;

}

.hero-search{

    height:55px;

}

.hero-search input{

    font-size:16px;

}

.featured{

    margin-top:20px;

}

.featured .container{

    grid-template-columns:1fr;

}

.category .container{

    justify-content:center;

}

.card-buttons{

    flex-direction:column;

}

.footer-content{

    flex-direction:column;

    text-align:center;

}

}


@media(max-width:480px){

.container{

    width:94%;

}

.games-grid{

    grid-template-columns:1fr;

}

.card-title{

    font-size:20px;

}

.hero h1{

    font-size:26px;

}

.hero-search{

    padding:0 15px;

}

.scrollTop{

    width:50px;

    height:50px;

    right:15px;

    bottom:15px;

}

}


/* ==========================================
        UTILITIES
========================================== */

.text-center{

    text-align:center;

}

.mt-1{

    margin-top:10px;

}

.mt-2{

    margin-top:20px;

}

.mt-3{

    margin-top:30px;

}

.mb-1{

    margin-bottom:10px;

}

.mb-2{

    margin-bottom:20px;

}

.mb-3{

    margin-bottom:30px;

}

.d-none{

    display:none !important;

}

.w-100{

    width:100%;

}
