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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* NAV */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0.8rem 2rem;
    position: absolute;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    white-space: nowrap;
}

.nav-center { display: flex; gap: 1.2rem; }

.nav-center a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-center a:hover { color: #ffd93d; }

.lang-switcher { display: flex; gap: 2px; }

.lang-btn {
    background: rgba(255,255,255,0.05);
    color: #888;
    border: 1px solid #2a2a4e;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.lang-btn:first-child { border-radius: 6px 0 0 6px; }
.lang-btn:last-child { border-radius: 0 6px 6px 0; }
.lang-btn.active { background: #ffd93d; color: #1a1a3e; border-color: #ffd93d; }
.lang-btn:hover:not(.active) { color: #ffd93d; border-color: #4d96ff; }

/* HEADER */
header {
    text-align: center;
    padding: 4rem 1rem 2rem;
    position: relative;
    background: linear-gradient(180deg, rgba(15,12,41,0.8), transparent);
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #ff6b6b);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientText 4s ease infinite;
}

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

.hero p {
    font-size: 1.2rem;
    color: #aaa;
    margin: 0.8rem auto 0;
    max-width: 600px;
}

.search-bar {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    border: 2px solid #4d96ff;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.search-bar input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    background: rgba(255,255,255,0.12);
}

.search-bar input::placeholder { color: #888; }

/* FEATURED */
.featured {
    max-width: 1200px;
    width: 100%;
    padding: 2rem 2rem 0.5rem;
}

.featured h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffd93d;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
}

.featured-card {
    background: linear-gradient(145deg, #1a1a3e, #2a1a4e);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255,107,107,0.05), transparent, rgba(77,150,255,0.05), transparent);
    animation: spin 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover::before { opacity: 1; }
.featured-card:hover { border-color: #ffd93d; transform: translateY(-4px); box-shadow: 0 12px 30px rgba(255, 217, 61, 0.15); }

.featured-card--xl { grid-column: 1; grid-row: 1 / 3; flex-direction: column; text-align: center; padding: 2rem; }
.featured-card--lg { grid-column: 2 / 4; }

.featured-icon { font-size: 2.8rem; position: relative; z-index: 1; }
.featured-card--xl .featured-icon { font-size: 4.5rem; }
.featured-body { position: relative; z-index: 1; }
.featured-body h3 { font-size: 1.15rem; color: #ffd93d; margin-bottom: 0.3rem; }
.featured-card--xl .featured-body h3 { font-size: 1.5rem; }
.featured-body p { font-size: 0.82rem; color: #b0b0b0; }
.featured-tag { display: inline-block; margin-top: 0.4rem; padding: 0.2rem 0.8rem; border-radius: 50px; background: rgba(255, 107, 107, 0.2); color: #ff6b6b; font-size: 0.75rem; font-weight: 600; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ADS */
.ad { width: 100%; max-width: 1200px; padding: 0 2rem; margin: 0.5rem 0; }
.ad-placeholder { width: 100%; min-height: 90px; background: rgba(255,255,255,0.03); border: 1px dashed #2a2a4e; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #555; font-size: 0.85rem; }

/* CATEGORIES */
.category { max-width: 1200px; width: 100%; padding: 2rem 2rem 0.5rem; }
.category h2 { font-size: 1.4rem; margin-bottom: 1rem; color: #ffd93d; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
}

.game-card {
    background: linear-gradient(145deg, #1a1a3e, #2a1a4e);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(255,107,107,0.08), transparent, rgba(77,150,255,0.08), transparent);
    animation: spin 6s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover::before { opacity: 1; }
.game-card:hover { transform: translateY(-6px) scale(1.03); border-color: #ffd93d; box-shadow: 0 16px 40px rgba(255, 217, 61, 0.2); }

.game-icon { font-size: 2.6rem; margin-bottom: 0.5rem; display: block; position: relative; z-index: 1; transition: transform 0.3s; }
.game-card:hover .game-icon { transform: scale(1.15) rotate(-5deg); }
.game-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; color: #ffd93d; position: relative; z-index: 1; }
.game-card p { font-size: 0.8rem; color: #999; line-height: 1.4; position: relative; z-index: 1; }
.game-card.game-card-hide { display: none; }

/* FOOTER */
footer { width: 100%; max-width: 1200px; padding: 2rem; margin-top: 1rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #2a2a4e; }
.footer-col h4 { color: #ffd93d; font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer-col p { color: #888; font-size: 0.82rem; line-height: 1.5; }
.footer-col a { display: block; color: #888; text-decoration: none; font-size: 0.82rem; margin-bottom: 0.4rem; transition: 0.3s; }
.footer-col a:hover { color: #ffd93d; }
.footer-copy { text-align: center; color: #555; font-size: 0.78rem; padding-top: 1.5rem; }

/* RESPONSIVE - TABLET */
@media (max-width: 900px) {
    .featured-grid { grid-template-columns: 1fr 1fr; }
    .featured-card--xl { grid-column: 1 / -1; grid-row: auto; flex-direction: row; text-align: left; }
    .featured-card--xl .featured-icon { font-size: 3rem; }
    .featured-card--lg { grid-column: auto; }
    .hero h1 { font-size: 2.8rem; }
}

/* RESPONSIVE - MOBILE */
@media (max-width: 640px) {
    .top-nav { padding: 0.6rem 1rem; flex-wrap: wrap; gap: 0.4rem; }
    .nav-center { order: 3; width: 100%; justify-content: center; gap: 0.8rem; }
    .nav-center a { font-size: 0.8rem; }
    .lang-switcher { order: 2; }
    .logo { font-size: 1.2rem; }

    header { padding: 5rem 0.8rem 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 0.95rem; }

    .featured-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .featured-card--xl { flex-direction: row; text-align: left; padding: 1rem; }
    .featured-card--xl .featured-icon { font-size: 2.5rem; }
    .featured-card--xl .featured-body h3 { font-size: 1.1rem; }
    .featured-card--lg { padding: 1rem; }
    .featured { padding: 1.5rem 1rem 0.5rem; }
    .featured h2 { font-size: 1.2rem; }

    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .game-card { padding: 1rem; }
    .game-icon { font-size: 2rem; }
    .game-card h3 { font-size: 0.95rem; }

    .category { padding: 1.5rem 1rem 0.5rem; }
    .category h2 { font-size: 1.2rem; }

    .ad { padding: 0 1rem; }
    .ad-placeholder { min-height: 60px; font-size: 0.75rem; }

    footer { padding: 1.5rem 1rem; }
    .footer-content { grid-template-columns: 1fr; gap: 1.2rem; }
}

@media (max-width: 380px) {
    .game-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.6rem; }
    .nav-center a { font-size: 0.75rem; gap: 0.5rem; }
}
