/* main-style.css */

:root {
    --primary-color: #4c5de4;
    --primary-hover: #3a4bd4;
    --bg-dark: #2a2929;
    --bg-nav: #2d2d2d;
    --bg-hover: #3d3d3d;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 70px;
    background-color: var(--bg-nav);
    box-shadow: 0 2px 8px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav img {
    height: 40px;
    width: auto;
    margin-right: 12px;
}

nav > span {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 1px;
    flex: 1;
}

nav div {
    display: flex;
    gap: 30px;
    margin: 0 40px;
}

nav div a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

nav div a:hover {
    background-color: var(--bg-hover);
    color: var(--primary-color);
}

search {
    display: flex;
    align-items: center;
    min-width: 240px;
    gap: 8px;
}

search input[type="text"] {
    flex: 1;
    padding: 10px 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    background-color: var(--bg-hover);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

search input[type="text"]::placeholder {
    color: #999;
}

search input[type="text"]:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-nav);
    box-shadow: 0 0 0 3px rgba(76, 93, 228, 0.1);
}

search input[type="text"]:hover {
    background-color: #454545;
}

search button {
    padding: 0;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

search button img {
    width: 18px;
    height: 18px;
    display: block;
    margin: auto;
}

search button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(76, 93, 228, 0.4);
}

search button:active {
    transform: translateY(0);
}

/* Carousel Styles */
.carousel-container {
    width: 100%;
    padding: 30px;
    background-color: var(--bg-dark);
}

.carousel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-align: left;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.carousel-track {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 6;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    left: 60px;
    bottom: 40px;
    z-index: 2;
    color: var(--text-primary);
}

.carousel-content h2 {
    font-size: 35px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.detail-btn {
    padding: 12px 32px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 93, 228, 0.5);
}

.detail-btn:active {
    transform: translateY(0);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.indicator {
    width: 40px;
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.7);
    transform: scaleY(1.2);
}

.indicator.active {
    background-color: var(--primary-color);
    width: 60px;
}

/* Game Cards Section */
.game-section {
    width: 100%;
    padding: 50px;
    background-color: var(--bg-dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1500px;
    margin: 0 auto 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.view-more-btn {
    padding: 8px 24px;
    border: 1px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 93, 228, 0.5);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1500px;
    margin: 0 auto;
}

.game-card {
    aspect-ratio: 5 / 6;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-nav);
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(76, 93, 228, 0.4);
}

.game-image {
    height: 33.33%;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-info {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.platform-tag {
    padding: 4px 10px;
    background-color: var(--primary-color);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.game-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.release-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.download-btn {
    margin-top: auto;
    padding: 10px 20px;
    border: none;
    background-color: var(--primary-color);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 93, 228, 0.5);
}

/* Responsive */
@media (max-width: 1200px) {
    .card-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .card-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .card-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-section {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .card-list {
        grid-template-columns: 1fr;
    }
}