/* Reset e Variabili */
:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --dark-bg: #292F36;
    --light-bg: #F7FFF7;
    --text-color: #292F36;
    --white: #ffffff;
    --font-main: 'Fredoka', sans-serif;
    --font-display: 'Press Start 2P', cursive;
    --card-shadow: 0 10px 20px rgba(0,0,0,0.1);
    --hover-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Sfondo Animato (Semplice gradiente) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fceeff 0%, #e8f7ff 100%);
    z-index: -1;
}

/* Header */
.main-header {
    background-color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--dark-bg);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo .highlight {
    color: var(--primary-color);
}

.slogan {
    font-size: 0.8rem;
    color: #666;
    margin-top: -5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: var(--dark-bg);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60vh;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--dark-bg);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-main);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.6);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 5rem;
}

.floating-icon {
    animation: float 3s ease-in-out infinite;
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Games Section */
.games-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 2rem;
    font-family: var(--font-display);
    color: var(--dark-bg);
}

.search-bar input {
    padding: 0.8rem 1.5rem;
    border: 2px solid #eee;
    border-radius: 30px;
    font-size: 1rem;
    width: 300px;
    font-family: var(--font-main);
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

/* Game Card */
.game-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.game-thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.game-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-info h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.game-info p {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.play-btn {
    align-self: flex-start;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.game-card:hover .play-btn {
    background-color: #3db9b0;
}

/* About Section */
.about-section {
    background-color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.about-section h3 {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--dark-bg);
}

.features {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.feature-item {
    max-width: 300px;
}

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

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-content {
        padding-right: 0;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }

    .search-bar input {
        width: 100%;
    }
}