* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #151515;
    --accent: #00d4ff;
    --accent-hover: #00b8e6;
    --text: #e0e0e0;
    --text-muted: #888888;
    --border: rgba(255, 255, 255, 0.05);
    --whatsapp-green: #25D366;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
}

.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    left: -250px;
    animation: float 20s ease-in-out infinite;
}

.bg-animation::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    right: -200px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--text);
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    background: rgba(10, 10, 10, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled {
    padding: 16px 0;
    background: rgba(10, 10, 10, 0.8);
}

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

.logo {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.logo:hover::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

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

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

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

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.search-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.search-icon {
    color: var(--text-muted);
    font-size: 14px;
}

#search-input {
    background: none;
    border: none;
    color: var(--text);
    font-size: 14px;
    padding: 0;
    flex: 1;
    width: 240px;
    min-width: 160px;
    font-family: 'Inter', sans-serif;
}

#search-input:focus {
    outline: none;
}

#search-input::placeholder {
    color: var(--text-muted);
}

main {
    position: relative;
    z-index: 1;
    padding: 120px 32px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 60px;
}

.category-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.category-title:hover::after {
    width: 100%;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.game-thumbnail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.game-thumbnail:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

.game-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-thumbnail.img-fallback img {
    object-fit: contain;
    background: var(--bg-secondary);
}

.game-thumbnail:hover img {
    transform: scale(1.1);
}

.game-thumbnail p {
    margin: 0;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.game-thumbnail:hover p {
    transform: translateY(0);
}

.game-thumbnail a {
    text-decoration: none;
    color: inherit;
    display: block;
}

#preview-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 0 50px rgba(0, 212, 255, 0.2);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    width: 90%;
    max-width: 1200px;
    border-radius: 20px;
    overflow: hidden;
}

#preview-container.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

#preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

#preview-title {
    font-weight: 600;
    color: var(--text);
    font-size: 18px;
    letter-spacing: -0.3px;
}

#preview-controls {
    display: flex;
    gap: 12px;
}

.preview-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

#preview-frame {
    width: 100%;
    height: 70vh;
    border: none;
    background: var(--bg);
}

#exit-fullscreen {
    position: fixed;
    top: 32px;
    right: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 12px;
    width: 48px;
    height: 48px;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 2001;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}


#exit-fullscreen:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}


.contact-button {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--whatsapp-green);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.contact-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.contact-button i {
    font-size: 24px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .search-container {
        width: 100%;
        order: 2;
    }
    
    #search-input {
        width: 100%;
        flex: 1;
    }
    
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    #preview-container {
        width: 95%;
    }

    main {
        padding: 100px 24px 40px;
    }

    .category-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }

    .logo img {
        height: 24px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .game-thumbnail img {
        height: 160px;
    }

    .category-title {
        font-size: 20px;
    }
    
    .contact-button {
        width: 48px;
        height: 48px;
        bottom: 24px;
        right: 24px;
    }

    .contact-button i {
        font-size: 20px;
    }
}
