/* style5.css - Jobtarget24 HTML5 Portal Styles */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans', 'Lato', Helvetica Neue, Arial, sans-serif;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: #f7f9fc;
    color: #333;
    scroll-behavior: smooth;
}

a {
    color: #333;
    text-decoration: none;
}

li {
    list-style: none;
}

img {
    vertical-align: middle;
}

/* ────────────────────────────────────────────────────────────────
   INDEX / HOMEPAGE LAYOUT
   ──────────────────────────────────────────────────────────────── */
.index-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding-top: 5px;
}

.grid-warp {
    margin: 0 auto;
    width: 100%;
    max-width: 1600px;
    padding: 0 16px;
}

.game-list-warp {
    display: grid;
    grid-auto-rows: calc(100vw / var(--gridTemplateColumns) - 16px - 2px);
    grid-gap: 16px;
    grid-auto-flow: dense;
    justify-content: center;
    margin: 16px auto;
    padding: 0;
    list-style-type: none;
    grid-template-columns: repeat(var(--gridTemplateColumns), calc(100vw / var(--gridTemplateColumns) - 16px - 2px));
}

.game-list,
.game-list li {
    display: contents;
}

.game-list li a {
    display: block;
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    height: 100%;
    width: 100%;
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 6px 12px 0px;
    overflow: hidden;
}

.game-list li a:hover {
    z-index: 10;
    transform: scale(1.04) translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 10px 20px 0px;
    outline: 2px solid #838fff;
}

.game-list-warp .game-img {
    border-radius: 16px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Loading Dots */
.loader-dots {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 4px;
}
.loader-dots .dot {
    width: 8px;
    height: 8px;
    background-color: rgba(131, 143, 255, 0.6);
    border-radius: 50%;
    animation: pulse 1.2s infinite ease-in-out;
}
.loader-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 100% { transform: scale(0.6); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 1; }
}

.game-item-title {
    position: absolute;
    bottom: 10px;
    font-size: 14px;
    margin: 0;
    width: 100%;
    z-index: 5003;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    color: #fff;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) 0.05s, opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1) 0.05s;
}

.game-item-shadow {
    position: absolute;
    background: linear-gradient(0deg, rgba(0, 0, 0, .6) 0, transparent 60%);
    border-radius: 16px;
    bottom: 0;
    display: none;
    height: 100%;
    width: 100%;
    z-index: 5002;
}

/* Hover behaviors */
@media screen and (min-width:768px) {
    .game-list-warp .game-list .game-link:hover .game-item-title {
        opacity: 1;
        transform: translateY(0);
    }

    .game-list-warp .game-list .game-link:hover .game-item-shadow {
        display: block;
    }
}

/* Grid Columns for responsiveness */
@media (min-width: 104px) and (max-width: 543px) {
    .game-list-warp {
        --gridTemplateColumns: 3;
    }
}
@media (min-width: 544px) and (max-width: 763px) {
    .game-list-warp {
        --gridTemplateColumns: 5;
    }
}
@media (min-width: 764px) and (max-width: 1204px) {
    .game-list-warp {
        --gridTemplateColumns: 7;
    }
}
@media (min-width: 1205px) and (max-width: 1313px) {
    .game-list-warp {
        --gridTemplateColumns: 11;
    }
}
@media (min-width: 1314px) and (max-width: 1533px) {
    .game-list-warp {
        --gridTemplateColumns: 12;
    }
}
@media (min-width: 1534px) and (max-width: 1863px) {
    .game-list-warp {
        --gridTemplateColumns: 14;
    }
}
@media (min-width: 1864px) {
    .game-list-warp {
        --gridTemplateColumns: 17;
    }
}

/* ────────────────────────────────────────────────────────────────
   PLAY / DETAILS PAGE LAYOUT
   ──────────────────────────────────────────────────────────────── */
.play-body-container {
    background-color: #f7f9fc;
    padding: 30px 0;
    min-height: 100vh;
}

.detail-main-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.detail-main-container .main-container {
    width: calc(100% - 340px);
}

.detail-main-container .right-rec-container {
    width: 300px;
}

/* White Content Wrapper for details */
.white-box {
    background-color: #ffffff;
    color: #222222;
    border-radius: 20px;
    padding: 30px;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 24px;
    margin-bottom: 24px;
}

/* Info Card Row */
.info-card {
    display: flex;
    width: 100%;
    height: 164px;
}

.info-card .info-img {
    position: relative;
    border-radius: 20px;
    height: 100%;
    overflow: hidden;
    width: 164px;
    background-color: #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.info-card .info-img .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-card .info-info {
    height: 100%;
    width: calc(100% - 190px);
    margin-left: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.info-card .info-info .info-name h1 {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-card .info-info .info-developer {
    display: flex;
    align-items: center;
}

.info-developer .line {
    height: 18px;
    border-right: 1px solid #c4c4c4;
    margin: 0 20px;
}

.info-developer-item {
    display: flex;
    align-items: center;
}

.info-developer-item .icon {
    margin-right: 8px;
    height: 18px;
    width: 18px;
}

.info-developer-item .number {
    font-size: 15px;
    color: #73777a;
    font-weight: 400;
}

.rating-container {
    display: flex;
    align-items: center;
}

.rating-container .start {
    margin-right: 4px;
    width: 20px;
    height: 20px;
}

.rating-score {
    color: #73777a;
    font-weight: 600;
    margin-left: 8px;
    font-size: 16px;
}

/* Info List Grid Table */
.about-game {
    width: 100%;
    margin-top: 24px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.about-game .game-info-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    list-style: none;
    margin: 0;
    width: 100%;
}

.about-game .game-info-table li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
    padding: 0 10px;
}

.about-game .game-info-table li .info-key {
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

.about-game .game-info-table li .info-value {
    color: #222;
    font-weight: 400;
    font-size: 15px;
}

/* Editor's Review & How to Play */
.editor-review, .how-to-play {
    width: 100%;
    margin-top: 20px;
}

.editor-review .editor-review-title,
.how-to-play .how-to-play-title {
    color: #222;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    width: 100%;
}

.editor-review .desc {
    color: #444;
    font-size: 15px;
    line-height: 1.8;
}

/* Play Now / Start Now CTA Button */
.play-now-cta-box {
    width: 100%;
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.play-now-btn-h5 {
    background: linear-gradient(90deg, #10ddff 0%, #838fff 100%);
    border-radius: 35px;
    height: 52px;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(131, 143, 255, 0.4);
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.play-now-btn-h5:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(131, 143, 255, 0.6);
}

/* Recommended Sidebar List (Right Side) */
.you-may-like {
    overflow: hidden;
    width: 100%;
}

.you-may-like-title {
    color: #222;
    font-size: 22px;
    font-weight: 600;
    margin: 0 auto 20px;
    width: 100%;
}

.you-may-like .game-list {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.you-may-like .game-item {
    align-items: center;
    display: flex;
    flex: 0 0 100%;
    flex-direction: row;
    padding: 12px;
    width: 100%;
    height: 93px;
    border-radius: 16px;
    margin-bottom: 12px;
    background-color: #ffffff;
    border: 1px solid #eef2f6;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 4px 12px;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.you-may-like .game-item:hover {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

.you-may-like .game-item .item-img {
    background-color: #eee;
    border-radius: 10px;
    height: 71px;
    width: 71px;
    object-fit: cover;
    overflow: hidden;
    margin-right: 12px;
}

.you-may-like .game-item .item-info {
    width: calc(100% - 83px);
    height: 71px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.you-may-like .game-item .item-info h2 {
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    color: #222;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.you-may-like .game-item .item-info span {
    border: none;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 0 !important;
    color: #718096;
    font-weight: 400;
    font-size: 13px;
}

/* ────────────────────────────────────────────────────────────────
   COMMON FOOTER STYLING
   ──────────────────────────────────────────────────────────────── */
footer {
    padding: 40px 0 24px 0;
    background-color: #f7f9fc;
}

footer .line {
    width: 90%;
    max-width: 1200px;
    height: 1px;
    background-color: #e2e8f0;
    margin: 0 auto 24px;
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.links {
    margin-bottom: 15px;
}

.links a {
    margin: 0 12px;
    color: #718096;
    font-size: 14px;
    transition: color 0.2s ease;
}

.links a:hover {
    color: #1a202c;
    text-decoration: underline;
}

.copyright-text {
    font-size: 13px;
    color: #a0aec0;
    line-height: 1.6;
}

/* ────────────────────────────────────────────────────────────────
   MEDIA QUERIES / RESPONSIVENESS
   ──────────────────────────────────────────────────────────────── */
@media screen and (max-width: 1200px) {
    .detail-main-container {
        flex-direction: column;
    }
    .detail-main-container .main-container {
        width: 100%;
        margin: 0 auto;
    }
    .detail-main-container .right-rec-container {
        width: 100%;
        margin-top: 32px;
    }
    .you-may-like .game-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 16px;
        width: 100%;
    }
    .you-may-like .game-item {
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .detail-main-container {
        padding: 0 16px;
    }
    
    .info-card {
        height: 100px;
    }
    
    .info-card .info-img {
        width: 100px;
        border-radius: 12px;
    }
    
    .info-card .info-info {
        width: calc(100% - 120px);
        margin-left: 16px;
    }
    
    .info-card .info-info .info-name h1 {
        font-size: 20px;
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .about-game .game-info-table {
        grid-template-columns: 1fr;
    }
    
    .about-game .game-info-table li {
        height: 38px;
    }

    .you-may-like .game-list {
        grid-template-columns: 1fr;
    }
}

/* ────────────────────────────────────────────────────────────────
   CATEGORY NAVIGATION HYBRID WRAPPER
   ──────────────────────────────────────────────────────────────── */
.category-nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.category-more-btn {
    display: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@media screen and (max-width: 768px) {
    .category-nav-wrapper {
        padding: 0 16px;
    }
    
    .category-nav {
        justify-content: flex-start;
        padding-left: 0;
        padding-right: 48px; /* Space for the floating button */
        width: 100%;
        margin-top: 15px;
    }

    .category-more-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        height: 40px;
        width: 40px;
        border-radius: 50%;
        background-color: #ffffff;
        border: 1px solid #eef2f6;
        color: #4a5568;
        box-shadow: rgba(0, 0, 0, 0.08) -4px 0px 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
        z-index: 10;
        margin-top: 4px;
    }

    .category-more-btn:active {
        transform: translateY(-50%) scale(0.95);
        background-color: #f8fafc;
    }

    .category-more-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ────────────────────────────────────────────────────────────────
   CATEGORY MODAL / BOTTOM SHEET
   ──────────────────────────────────────────────────────────────── */
.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.category-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.category-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.15);
    max-height: 75vh;
    overflow-y: auto;
    color: #333333;
}

.category-modal.open {
    transform: translateY(0);
}

.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.category-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.category-modal-close {
    font-size: 28px;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.category-modal-close:hover {
    color: #475569;
}

.category-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-modal-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.category-modal-card:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.category-modal-card.active {
    background-color: #ebedff;
    border-color: #cdd2ff;
    color: #4a5dff;
}

.category-modal-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.category-modal-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}


/* ────────────────────────────────────────────────────────────────
   CATEGORY NAVIGATION STYLING
   ──────────────────────────────────────────────────────────────── */
.category-nav {
    display: flex;
    gap: 12px;
    margin: 20px auto 15px auto;
    padding: 8px 10px;
    overflow-x: auto;
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.category-nav::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background-color: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 2px 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.category-pill:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1a202c;
    transform: translateY(-1px);
    box-shadow: rgba(0, 0, 0, 0.04) 0px 4px 8px;
}

.category-pill.active {
    background-color: #ebedff;
    border-color: #cdd2ff;
    color: #4a5dff;
    box-shadow: rgba(131, 143, 255, 0.1) 0px 4px 12px;
}

.category-pill.active:hover {
    background-color: #dfdfff;
    border-color: #b9bfff;
    color: #3b4eff;
}

.category-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.category-pill-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

@media screen and (max-width: 768px) {
    .category-nav {
        justify-content: flex-start;
        padding-left: 16px;
        padding-right: 16px;
    }
}

