
:root {
    --bg-dark: #0f0f12;
    --bg-card: #1a1a20;
    --primary-purple: #6200ea;
    --accent-purple: #b388ff;
    --text-main: #ffffff;
    --text-sec: #b0b0b0;
    --steam-color: #1b2838;
    --epic-color: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Kanit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}


header {
    background-color: rgba(15, 15, 18, 0.95);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid #2a2a35;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo span { color: #fff; }

.search-bar input {
    width: 300px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #333;
    background: #222;
    color: #fff;
    outline: none;
    transition: 0.3s;
}
.search-bar input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(98, 0, 234, 0.5);
}

.hero {
    min-height: 600px; 
    background: linear-gradient(0deg, var(--bg-dark) 0%, rgba(98,0,234,0.2) 100%), 
                url('images/7.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.hero h1 { 
    font-size: 2.5rem;
    text-shadow: 0 0 15px rgba(98, 0, 234, 0.8); 
}


.hero h1 { 
font-size: 4rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(98, 0, 234, 1);
    margin-bottom: 15px;
}
.hero p { 
font-size: 1.4rem;
    color: #f0f0f0; 
    font-weight: 500;
    max-width: 800px; 
    line-height: 1.5;
}


.container { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

.filters { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 40px; 
    flex-wrap: wrap; }
.filter-btn {
    background: transparent;
    border: 1px solid var(--primary-purple);
    color: var(--text-main);
    padding: 6px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Kanit', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary-purple);
    box-shadow: 0 0 15px rgba(98, 0, 234, 0.6);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.game-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #2a2a35;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--primary-purple);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #222;
}

.card-content { 
    padding: 15px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
}

.badge {
    font-size: 0.75rem;
    background: rgba(98, 0, 234, 0.2);
    color: var(--accent-purple);
    padding: 2px 8px;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.card-title { 
    font-size: 1.25rem; 
    margin-bottom: 5px; 
    font-weight: 600; 
}
.card-short-desc {
    font-size: 0.85rem;
    color: var(--text-sec);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-card {
    width: 100%;
    padding: 8px;
    background: #2a2a35;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}

.game-card:hover .btn-card { 
    background: var(--primary-purple); 
}

.store-btn.pc-shop {
    background-color: #ff0000;
    border: 1px solid rgba(255,255,255,0.2);
}

.store-btn.pc-shop:hover {
    background-color: #ff0000;
    transform: translateY(-3px);
}

.store-btn.pc-shop1 {
    background-color: #00a7e9;
    border: 1px solid rgba(255,255,255,0.2);
}

.store-btn.pc-shop1:hover {
    background-color: #00a7e9;
    transform: translateY(-3px);
}
.store-btn.pc-shop2 {
    background-color: #001868;
    border: 1px solid rgba(255,255,255,0.2);
}

.store-btn.pc-shop2:hover {
    background-color: #001868;
    transform: translateY(-3px);
}

.game-card .card-content::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}


.game-card .card-content,
.modal-content,
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 2000; 
    opacity: 0; visibility: hidden; 
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.modal-overlay.active { 
    opacity: 1; 
    visibility: visible; 
}

.modal-content {
    background: var(--bg-card);
    width: 90%; 
    max-width: 800px;
    border-radius: 15px;
    border: 1px solid var(--primary-purple);
    box-shadow: 0 0 50px rgba(98, 0, 234, 0.3);
    display: flex; 
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    background: linear-gradient(90deg, #1a1a20 0%, #311b92 100%);
    padding: 20px 30px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-bottom: 1px solid #333;
    position: sticky; top: 0; z-index: 10;
}

.modal-header h2 { 
    color:white; 
    font-family:'Rajdhani', sans-serif; 
    letter-spacing:1px; 
}

.close-btn { 
    background: none; 
    border: none; color: #fff; 
    font-size: 2rem; 
    cursor: pointer; 
}

.modal-body {
     padding: 30px;
}

.section-title {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #333;
    display: flex; align-items: center; gap: 10px;
}

.section-title i { 
    color: var(--accent-purple); 
}

.game-overview-text { color: #ccc; 
    margin-bottom: 25px; 
    font-size: 1rem; 
    line-height: 1.7; 
}

.store-links { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
}

.store-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-purple), var(--accent-purple));
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--primary-purple);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-purple) var(--bg-dark);
}
.logo {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px var(--primary-purple));
}

.logo:active {
    transform: scale(0.95);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--primary-purple);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    color: var(--text-main);
}

.page-num.active, .page-num:hover {
    background: var(--primary-purple);
    box-shadow: 0 0 10px var(--primary-purple);
}

.filter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #444;
}

.page-num {
    position: relative;
    overflow: hidden;
}

.page-num.active {
    background: var(--primary-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(98, 0, 234, 0.5);
}

.page-num:hover:not(.active) {
    background: rgba(179, 136, 255, 0.2);
    transform: translateY(-5px);
}
.page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    color: var(--primary-purple);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 1.2rem;
    user-select: none;
    opacity: 0.6;
    transition: 0.3s;
}

.page-dots:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--primary-purple);
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background: #fff; width: 25px; border-radius: 10px; }
footer { 
    text-align: center; 
    padding: 30px; 
    margin-top: 50px; 
    border-top: 1px solid #2a2a35; 
    color: #666; 
    font-size: 0.9rem; 
}


.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    cursor: pointer;
}

.carousel-item {
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px;
    text-align: left;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
}

.carousel-btn.next {
     right: 0; 
     
}
.carousel-btn.prev {
     left: 0; 
     
}
.carousel-container {
    position: relative;
    width: 95%;
    max-width: 1100px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    background: #1a1a1a;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    height: 450px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: 0.3s;
}

.carousel-item:hover img {
    filter: brightness(0.9);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 50px 30px 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0);
    color: rgb(255, 255, 255);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: 0.3s;
    z-index: 10;
}


.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background: #fff; width: 25px; border-radius: 10px; }


.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    cursor: pointer;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);

    transition: filter 1s ease, transform 1s ease;
}


.carousel-item.active img {
    filter: brightness(0.8);
}


.store-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.store-btn.steam { background-color: var(--steam-color); }
.store-btn.epic { background-color: var(--epic-color); }
.store-btn.web { background-color: var(--primary-purple); }

.spec-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .spec-container { grid-template-columns: 1fr; } }

.spec-box { background: #121215; padding: 20px; border-radius: 10px; border-left: 3px solid #444; }
.spec-box.rec { border-left: 3px solid var(--accent-purple); }
.spec-head { color: var(--accent-purple); margin-bottom: 15px; font-weight: bold; text-transform: uppercase; font-size: 0.9rem;}
.spec-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem; border-bottom: 1px solid #222; padding-bottom: 4px; }
.spec-row:last-child { border: none; }
.spec-key { color: #777; }
.spec-val { text-align: right; color: #ddd; max-width: 60%; }