* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #0f0f13;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- HEADER --- */
header {
    text-align: center;
    padding: 60px 20px;
    background: radial-gradient(circle at top, #1a1a2e 0%, #0f0f13 100%);
}

h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff8a00, #e52e71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

header p {
    color: #888;
    font-size: 1.2rem;
}

/* --- SELETTORE LINGUA --- */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

#lang-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

#lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- GRIGLIA PROGETTI --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #1a1a21;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(229, 46, 113, 0.3);
}

.card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Permette al click di passare alla card sottostante */
}

.play-overlay i {
    color: white;
    font-size: 3rem;
    filter: drop-shadow(0 0 15px rgba(229, 46, 113, 0.8));
    transform: scale(0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-image img { transform: scale(1.1); }
.card:hover .play-overlay { opacity: 1; }
.card:hover .play-overlay i { transform: scale(1); }

.card-info {
    padding: 20px;
}

.card-info h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.card-info p {
    color: #ff8a00;
    font-weight: 600;
    font-size: 0.9rem;
}

.mini-stats {
    margin-top: 15px;
    color: #888;
    font-size: 0.85rem;
}

/* --- MODALE --- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #1a1a21;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 20px;
    position: relative;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

.video-wrapper {
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
}

.modal-info {
    padding: 30px;
}

.screenshot-gallery {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    overflow-x: auto;
    padding-bottom: 10px;
}

.screenshot-gallery img {
    height: 150px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- BOTTONI AZIONI (LIKE & SHARE) --- */
.actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.like-button, .share-button {
    appearance: none;
    -moz-appearance: none;
    border: none;
    color: #fff;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    outline: none !important;
}

.like-button {
    background: rgba(229, 46, 113, 0.15);
    border: 1px solid #e52e71;
    color: #e52e71;
}

.like-button:hover:not(:disabled) {
    background: #e52e71;
    color: #fff;
    box-shadow: 0 0 20px rgba(229, 46, 113, 0.4);
}

.like-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.share-button {
    background: rgba(0, 119, 181, 0.15);
    border: 1px solid #0077b5;
    color: #0077b5;
}

.share-button:hover {
    background: #0077b5;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 119, 181, 0.4);
}

button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

a {
    color: #ff8a00;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 138, 0, 0.3);
    transition: 0.3s;
}

a:hover {
    color: #e52e71;
    border-bottom-color: #e52e71;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    backdrop-filter: blur(5px);
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}
