/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Press+Start+2P&display=swap');

:root {
    --bg-main: #0a0a0f;
    --bg-card: rgba(20, 22, 35, 0.6);
    --border-card: rgba(80, 90, 140, 0.2);
    --border-hover: #5dcaa5;
    
    --text-primary: #f0f0f5;
    --text-secondary: #a0a5ba;
    
    --accent-primary: #5dcaa5;
    --accent-secondary: #ffd166;
    --accent-tertiary: #d84a30;
    
    --font-heading: 'Press Start 2P', monospace;
    --font-body: 'Outfit', sans-serif;
    
    --glow-primary: 0 0 20px rgba(93, 202, 165, 0.4);
    --glow-secondary: 0 0 15px rgba(255, 209, 102, 0.3);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #2a2e4a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* --- EFFETTI DI SFONDO --- */
.grid-bg {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(93, 202, 165, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93, 202, 165, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    transform: perspective(500px) rotateX(45deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(45deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(45deg) translateY(50px) translateZ(-200px); }
}

.scanlines {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.3;
}

/* --- NAVIGAZIONE --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-card);
    z-index: 50;
    padding: 15px 0;
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-logo span { color: var(--accent-primary); }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
    text-shadow: var(--glow-primary);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding: 150px 24px 80px;
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.badge-pill {
    display: inline-block;
    background: rgba(93, 202, 165, 0.1);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--glow-primary);
}

.badge-pill.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(93, 202, 165, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(93, 202, 165, 0); }
    100% { box-shadow: 0 0 0 0 rgba(93, 202, 165, 0); }
}

.logo {
    font-family: var(--font-heading);
    font-size: clamp(28px, 5vw, 48px);
    letter-spacing: 3px;
    color: var(--text-primary);
    text-shadow: 4px 4px 0 var(--accent-tertiary);
    margin-bottom: 20px;
}

.logo span {
    color: var(--accent-secondary);
    text-shadow: 4px 4px 0 #b38b22;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
    font-weight: 300;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: #04342c;
    box-shadow: 0 4px 15px rgba(93, 202, 165, 0.3);
}

.btn-primary:hover {
    background: #4ab592;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 202, 165, 0.5);
}

/* --- MAIN CONTENT & GRID --- */
main {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

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

.mt-5 { margin-top: 80px; }

.section-title {
    font-family: var(--font-body);
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.section-title i {
    color: var(--accent-secondary);
}

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

/* --- CARDS --- */
.card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover:not(.disabled) {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(93, 202, 165, 0.2);
}

.card-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(93, 202, 165, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover .card-glow { opacity: 1; }

.thumb {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.thumb::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--bg-card), transparent);
}

.emoji {
    font-size: 72px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transform: scale(1);
    transition: transform 0.4s ease;
}

.card:hover:not(.disabled) .emoji {
    transform: scale(1.1) rotate(5deg);
}

.card-body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.platform-icon {
    font-size: 18px;
    color: var(--text-secondary);
}

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge_download {
    margin-left: auto;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 700;
    background: rgba(93, 202, 165, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(93, 202, 165, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card:hover .badge_download {
    background: var(--accent-primary);
    color: #000;
}

.badge.ready { background: rgba(93, 202, 165, 0.2); color: var(--accent-primary); }
.badge.soon { background: rgba(255, 209, 102, 0.2); color: var(--accent-secondary); }
.badge.programmed { background: rgba(216, 74, 48, 0.2); color: var(--accent-tertiary); }

/* --- DISABLED STATE --- */
.card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(40%);
}

.card.disabled .thumb {
    opacity: 0.8;
}

/* --- FOOTER --- */
footer {
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 15, 0.9);
    border-top: 1px solid var(--border-card);
    padding: 40px 24px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.footer-logo span { color: var(--accent-primary); }

footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

footer .small-text {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 20px;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    .hero { padding: 120px 20px 60px; }
    .logo { font-size: 24px; }
}