/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-bg: #1a1f2e;  /* Lightened from #0f172a */
    --dark-surface: #2a3142;  /* Lightened from #1e293b */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: rgba(148, 163, 184, 0.15);  /* Slightly more visible */
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Top Navigation Bar */
.navbar {
    background: rgba(26, 31, 46, 0.95);  /* Updated to match new --dark-bg */
    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;
}

.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::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.language-switcher {
    position: relative;
}

.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);
}

/* Fix dropdown options background and text color */
.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);
}

.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;
}

.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);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

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

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* Hero Section */
.hero {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background: 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%);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #f8fafc, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-arrow {
    transform: translate(3px, -3px);
}

.btn-secondary {
    background: var(--dark-surface);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

/* Floating Game Cards */
.hero-right {
    position: relative;
    height: 600px;
    overflow: visible;
    perspective: 1000px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-style: preserve-3d;
}

.game-card {
    position: absolute;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0;
    width: 220px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0s;
    cursor: pointer;
    overflow: hidden;
    transform-origin: center center;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-15px) scale(1.08);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.5), 0 15px 40px rgba(0, 0, 0, 0.4);
    /* Removed z-index change to prevent overlaying */
    border-color: rgba(99, 102, 241, 0.6);
}

.game-card-image {
    height: 100px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    overflow: hidden;
    background: var(--dark-bg);
    position: relative;
}

.game-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

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

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

.game-card-content {
    padding: 0.75rem;
}

.game-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.game-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    opacity: 0.8;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.game-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: #10b981;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
    transition: color 0.3s ease, background 0.3s ease, font-weight 0.3s ease;
}

/* Floating Animation - More dramatic vertical movement */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(-5deg); }
    25% { transform: translate(8px, -25px) rotate(-4deg); }
    50% { transform: translate(-6px, 20px) rotate(-6deg); }
    75% { transform: translate(5px, -15px) rotate(-4deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(3deg); }
    25% { transform: translate(-10px, 22px) rotate(4deg); }
    50% { transform: translate(7px, -28px) rotate(2deg); }
    75% { transform: translate(-4px, 18px) rotate(3deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(-2deg); }
    25% { transform: translate(9px, -20px) rotate(-1deg); }
    50% { transform: translate(-7px, 25px) rotate(-3deg); }
    75% { transform: translate(6px, -18px) rotate(-2deg); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0) rotate(4deg); }
    25% { transform: translate(-8px, 24px) rotate(3deg); }
    50% { transform: translate(10px, -22px) rotate(5deg); }
    75% { transform: translate(-5px, 15px) rotate(4deg); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0) rotate(-3deg); }
    25% { transform: translate(6px, -26px) rotate(-2deg); }
    50% { transform: translate(-8px, 23px) rotate(-4deg); }
    75% { transform: translate(4px, -17px) rotate(-3deg); }
}

.floating-card-1 {
    top: 10%;
    left: 5%;
    z-index: 2;
    transform: rotate(-5deg);
    animation: float1 8s ease-in-out infinite;
    animation-delay: 0s;
}

.floating-card-1:not(:hover) {
    z-index: 2;
}

.floating-card-2 {
    top: 5%;
    right: 15%;
    z-index: 3;
    transform: rotate(3deg);
    animation: float2 9s ease-in-out infinite;
    animation-delay: 1.5s;
}

.floating-card-2:not(:hover) {
    z-index: 3;
}

.floating-card-3 {
    top: 30%;
    left: 25%;
    z-index: 10;  /* Higher base z-index for SteamUnlock */
    transform: rotate(-2deg);
    animation: float3 7s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-card-3:not(:hover) {
    z-index: 10;
}

/* Special styling for SteamUnlock card */
.game-card.floating-card-3 {
    border: 2px solid #FFD700;
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.3), 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.95)),
                linear-gradient(135deg, #FFD700, #FFA500);
}

/* Change default price background from green to red for SteamUnlock */
.game-card.floating-card-3 .game-price {
    background: rgba(220, 38, 38, 0.15);  /* Red background instead of green */
    color: #dc2626;  /* Red text color */
}

.game-card.floating-card-3::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFED4E, #FFA500, #FFD700);
    border-radius: 12px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    background-size: 300% 300%;
    animation: shimmer 3s linear infinite;
}

.game-card.floating-card-3:hover {
    transform: translateY(-15px) scale(1.08);
    border-color: #FFED4E;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8),
                0 0 60px rgba(255, 215, 0, 0.6),
                0 25px 60px rgba(255, 215, 0, 0.4),
                0 15px 40px rgba(0, 0, 0, 0.4);
    /* Keep base z-index, no change on hover */
}

.game-card.floating-card-3:hover::after {
    opacity: 1;
}

/* Change text color to black on hover for SteamUnlock card */
.game-card.floating-card-3:hover .game-title,
.game-card.floating-card-3:hover .game-type {
    color: #1a1a1a;
    font-weight: 700;
}

.game-card.floating-card-3:hover .game-price {
    color: #ffffff;  /* White text for better contrast */
    background: rgba(220, 38, 38, 0.8);  /* Stronger red background on hover */
    font-weight: 700;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.floating-card-4 {
    bottom: 25%;
    right: 10%;
    z-index: 4;
    transform: rotate(4deg);
    animation: float4 8.5s ease-in-out infinite;
    animation-delay: 2s;
}

.floating-card-5 {
    bottom: 15%;
    left: 15%;
    z-index: 1;
    transform: rotate(-3deg);
    animation: float5 10s ease-in-out infinite;
    animation-delay: 1s;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--dark-surface);
    border-top: 1px solid var(--border-color);
}

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

.features-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #f8fafc, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.feature-card {
    background: var(--dark-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

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

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

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

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

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-right {
        height: 400px;
    }

    .game-card {
        width: 240px;
    }

    .floating-card-3, .floating-card-4 {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--dark-surface);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-left {
        gap: 1rem;
    }

    .nav-right {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-right {
        display: none;
    }

    .features-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}