/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-color: #e2e8f0;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-hover: #334155;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: url('../logo.jpg') center center / cover no-repeat fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px; /* Space for fixed footer */
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Splash Header */
header.splash {
    position: relative;
    min-height: 100vh;
    width: 100%;
    background: url('../logo.jpg') center center / cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.profile-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0;
    border: 2px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

header.splash h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 8px 20px rgba(15, 23, 42, 0.9);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

.scroll-hint {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Main Content */
main {
    flex: 1;
    padding: 3rem 0 4rem;
}

main.container {
    background: transparent;
    margin: 2rem auto;
    padding: 3rem 2rem 4rem;
}

.intro {
    text-align: center;
    margin-bottom: 3rem;
}

.intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.intro p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background: var(--glass-bg);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

.game-card.placeholder {
    cursor: default;
    opacity: 0.6;
}

.game-card.placeholder:hover {
    transform: none;
    border-color: var(--border-color);
    background: var(--glass-bg);
    box-shadow: none;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.game-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.game-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.game-card code {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    z-index: 100;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
}

.footer-games-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.footer-games-grid::-webkit-scrollbar {
    height: 4px;
}

.footer-games-grid::-webkit-scrollbar-track {
    background: transparent;
}

.footer-games-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 2px;
}

.footer-game-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.5rem;
    color: var(--text-color);
}

.footer-game-icon:hover {
    transform: translateY(-3px) scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.profile-circle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-circle:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.first-game-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    color: var(--text-color);
}

.first-game-circle:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    /* Fixed background using pseudo-element - doesn't scroll on mobile */
    body {
        background: none;
    }
    
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: url('../logo_mobile.jpg') center center / cover no-repeat;
        z-index: -1;
        /* Optimize for performance */
        will-change: transform;
        transform: translateZ(0);
        /* Ensure it covers the entire viewport */
        min-height: 100vh;
    }

    header.splash {
        background: none;
    }

    header h1 {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    main {
        padding: 2rem 0;
    }

    .footer-content {
        flex-direction: row;
        gap: 1rem;
    }

    .profile-circle {
        width: 50px;
        height: 50px;
    }

    .first-game-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .footer-game-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}
