:root {
    --bg-color: #050505;
    --surface-color: #111111;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #ffffff;
    --accent-hover: #dddddd;
    --border-color: #333333;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    color: var(--text-secondary);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
}

.logo img {
    max-height: 65px;
    width: auto;
    display: block;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgb(15, 15, 15) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Games Section */
.games-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.games-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

/* Game Card */
.game-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: var(--text-secondary);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.game-banner {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #222;
}

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

.game-card:hover .game-banner img {
    transform: scale(1.05);
}

.game-info {
    padding: 2rem;
    text-align: center;
}

.game-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-shop {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
}

.btn-shop:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

/* Game Details Page */
.game-header {
    text-align: center;
    padding: 5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.game-header-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.3);
    transform: scale(1.1);
    z-index: 0;
}

.game-header h1 {
    position: relative;
    z-index: 1;
    font-size: 3rem;
    font-weight: 800;
}

.items-section {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 8rem;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.item-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.item-img {
    width: 100%;
    height: 180px;
    background-color: #222;
    object-fit: cover;
}

.item-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-height: calc(1.5em * 5);
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 5px;
    text-align: left;
    white-space: pre-line;
}

.item-desc::-webkit-scrollbar {
    width: 4px;
}

.item-desc::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.item-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
}

.btn-qty {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-qty:hover {
    background: rgba(255, 255, 255, 0.1);
}

.qty-display {
    font-weight: 600;
}

.btn-add {
    text-align: center;
    padding: 0.8rem;
    background-color: var(--surface-color);
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-add:hover {
    background-color: var(--text-secondary);
    color: var(--bg-color);
}

.btn-buy {
    text-align: center;
    padding: 0.8rem;
    background-color: var(--accent);
    color: var(--bg-color);
    cursor: pointer;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: var(--transition);
}

.btn-buy:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Floating Cart Bar */
.floating-cart {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.floating-cart.visible {
    bottom: 20px;
}

.cart-info {
    display: flex;
    flex-direction: column;
}

.cart-total-items {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

.cart-total-price {
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-checkout {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout:hover {
    background-color: #333;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* --- OVERRIDES FOR MOBILE & EXPANDING CART --- */
@media (max-width: 768px) {
    .item-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    .item-img {
        height: 120px;
    }
    .item-info {
        padding: 0.8rem;
    }
    .item-info h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    .item-desc {
        font-size: 0.75rem;
    }
    .item-price {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }
    .qty-control {
        margin-bottom: 0px;
    }
    .btn-qty {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

.floating-cart {
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    z-index: 2;
}

.cart-details {
    width: 100%;
    max-height: 0;
    background: #111;
    color: #fff;
    transition: max-height 0.3s ease;
    overflow-y: auto;
}

.cart-details.expanded {
    max-height: 300px;
    border-top: 1px solid #333;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #222;
    font-size: 0.9rem;
}

.cart-item-row:last-child {
    border-bottom: none;
}