/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevent scrollbar flash on load */
html, body {
    scrollbar-gutter: stable;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --dark-bg: #1a1f2e;
    --dark-surface: #2a3142;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: rgba(148, 163, 184, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --success: #10b981;
    --danger: #ef4444;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    line-height: 1.6;
    color: var(--text-primary);
    background-image: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1), transparent 50%),
                      radial-gradient(ellipse at bottom, rgba(139, 92, 246, 0.1), transparent 50%);
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Top Navigation Bar - Same as product_checker */
.navbar {
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.language-select {
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-select:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.language-select option {
    background: var(--dark-surface);
    color: var(--text-primary);
    padding: 0.5rem;
}

.nav-cart {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.nav-cart:hover {
    color: var(--primary-color);
}

.nav-account, .nav-logout, .nav-login, .nav-register {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-account:hover, .nav-logout:hover, .nav-login:hover {
    color: var(--text-primary);
}

.nav-register {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-register:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: none;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Main content */
.main-content {
    margin-top: 100px;
    min-height: calc(100vh - 100px);
    padding: 2rem 0 0 0;
    position: relative;
    width: 100%;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Header section */
.header-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.header-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Search and Filter Section */
.search-filter-section {
    background: linear-gradient(135deg, #3a3f52, #2f3444);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    background: var(--dark-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.filter-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Products Section */
.products-section {
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: linear-gradient(135deg, #3a3f52, #2f3444);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    border-color: var(--primary-color);
}

.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-link:hover {
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
}

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

.product-img.lazy-load {
    background: linear-gradient(135deg, #2a2f3e, #3a3f52);
    position: relative;
}

.product-img.lazy-load::before {
    content: '🎮';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.3;
}

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

.product-header {
    margin-bottom: 0;
    border-bottom: none;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
    text-align: center;
    flex: 1;
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* Special SteamUnlock Card Styling */
.steamunlock-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2)) !important;
    border: 2px solid #FFD700 !important;
}

.steamunlock-card:hover {
    border-color: #FFED4E !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
}

.steamunlock-card .product-name {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700 !important;
}

.steamunlock-card:hover .product-name {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    font-weight: 700 !important;
}

/* Hidden Initially Class */
.product-card.hidden-initially {
    display: none !important;
}

/* Show More Button */
.show-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.show-more-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.show-more-btn .btn-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.show-more-btn:hover .btn-icon {
    transform: translateY(3px);
}

/* Products Count */
.products-count {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 20px;
}

/* Error and Empty States */
.error-container,
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3a3f52, #2f3444);
    border-radius: 15px;
    color: var(--text-primary);
    border: 2px solid rgba(239, 68, 68, 0.4);
}

.error-icon,
.no-products-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.error-container h3,
.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--danger);
}

.error-container p,
.no-products p {
    color: var(--text-secondary);
    margin: 0;
}

/* Help Section */
.help-section {
    margin-top: 40px;
    margin-bottom: 30px;
}

.help-card {
    background: linear-gradient(135deg, #3a3f52, #2f3444);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.help-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.help-icon {
    font-size: 2rem;
}

.help-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.help-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.help-link:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.help-link-icon {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--dark-surface);
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
    padding: 3rem 0 0 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-cart, .nav-account, .nav-logout {
        display: none;
    }

    .main-content {
        margin-top: 70px;
    }

    .main-container {
        padding: 0 15px;
    }

    .header-section h1 {
        font-size: 2rem;
    }

    .header-section p {
        font-size: 1rem;
    }

    .search-filter-section {
        padding: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-container {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 200px;
    }

    .help-actions {
        flex-direction: column;
    }

    .help-link {
        justify-content: center;
    }

    .show-more-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 1.8rem;
    }

    .search-filter-section {
        padding: 15px;
    }

    .product-card {
        padding: 15px;
    }

    .help-card {
        padding: 20px;
    }
}

/* Animation for smooth loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.product-card:nth-child(even) {
    animation-delay: 0.2s;
}
