@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #3b82f6;
    --primary-link: #60a5fa;
    --bg-dark: #0a0f1a;
    --bg-darker: rgba(2, 6, 23, 0.5);
    --nav-bg: rgb(15, 23, 42);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    padding-bottom: 100px;
}

nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    padding: 0;
    border-radius: 14px;
    display: flex;
    z-index: 1000;
    width: 180px;
    height: 45px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-indicator {
    position: absolute;
    width: 60px;
    height: 45px;
    background: var(--primary);
    border-radius: 14px;
    transition: 0.3s;
    left: 0;
    top: 0;
}

nav a {
    position: relative;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 45px;
}

nav a.active {
    color: var(--text);
}

nav a:nth-child(2).active ~ .nav-indicator {
    transform: translateX(60px);
}

nav a:nth-child(3).active ~ .nav-indicator {
    transform: translateX(120px);
}

nav i {
    font-size: 20px;
    line-height: 45px;
    height: 45px;
    width: 60px;
    text-align: center;
}

main {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-bottom: 0;
}

.content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    width: 100%;
    max-width: 1200px;
    padding: 3rem;
    background: var(--bg-darker);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.content.active {
    display: block;
    animation: slideIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    padding: 1rem;
}

.game-button {
    background: var(--nav-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.game-button:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.game-image-container {
    width: 180px;
    height: 180px;
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(0,0,0,0.2);
}

.game-title {
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    margin-top: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.5rem;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-title {
    color: var(--primary);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-text {
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    margin: 0 auto;
}

.dev-link {
    color: var(--primary-link);
    text-decoration: none;
    font-weight: 500;
}

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

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

@media (max-width: 600px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .game-image-container {
        width: 160px;
        height: 160px;
    }
    
    body {
        padding-bottom: 80px;
    }

    main {
        min-height: calc(100vh - 80px);
    }

    nav {
        width: 150px;
        height: 40px;
        bottom: 15px;
    }

    nav a {
        width: 50px;
        height: 40px;
    }

    nav i {
        font-size: 18px;
        line-height: 40px;
        height: 40px;
        width: 50px;
    }

    .nav-indicator {
        width: 50px;
        height: 40px;
    }

    nav a:nth-child(2).active ~ .nav-indicator {
        transform: translateX(50px);
    }

    nav a:nth-child(3).active ~ .nav-indicator {
        transform: translateX(100px);
    }

    .content {
        padding: 2rem;
    }

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

    .welcome-text {
        font-size: 1rem;
    }
}
