* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #00ffcc;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    scroll-behavior: smooth;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ── Secciones generales ── */
.section-hero {
    min-height: 120vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #222 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.section-white { padding: 80px 10%; background: #ffffff; }
.section-dark   { padding: 80px 10%; background: #1a1a1a; color: white; }

.title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 900;
}

/* ── Grid de proyectos ── */
.supercell-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    padding: 20px;
}

.card-proyecto {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.card-proyecto:hover {
    transform: scale(1.05) rotate(1deg);
}

.info-proyecto {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}

.info-proyecto h3 { font-size: 1.2rem; margin-bottom: 4px; }
.info-proyecto p  { font-size: 0.85rem; color: #ccc; }

/* ── Devblogs / Actividad ── */
.devlog-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.grupo-juego-devblog {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Tarjeta raíz (grupo de un juego) */
.devlog-item {
    background: #121212;
    border-radius: 15px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border-left: 4px solid var(--accent);
}

.devlog-item:hover {
    background: #1c1c1c;
    transform: translateX(4px);
}

/* Tarjetas hijas (actualizaciones individuales) */
.devlog-hijo {
    border-radius: 10px;
    border-left-color: rgba(0, 255, 204, 0.3);
    background: #0e0e0e;
}

.devlog-hijo:hover {
    background: #161616;
}

.devlog-info h3 {
    font-size: 1.05rem;
    color: #fff;
    margin: 4px 0;
}

.devlog-info p {
    color: #888;
    font-size: 0.88rem;
}

.tag-juego-small {
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.devlog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #555;
    font-size: 0.85rem;
    white-space: nowrap;
}

.chevron {
    font-size: 0.75rem;
    transition: transform 0.2s;
    color: var(--accent);
}

/* Acordeón de devblogs */
.devblog-desplegable {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0 8px 16px;
    /* Animación suave al abrir */
    overflow: hidden;
}

/* Cuando tiene la clase .abierto se muestra */
.devblog-desplegable.abierto {
    display: flex;
}

/* ── Modal ── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 30px;
    width: 90%;
    max-width: 760px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 40px;
    cursor: pointer;
    color: #333;
    line-height: 1;
    transition: color 0.2s;
}
.close-modal:hover { color: #000; }

/* Contenido del devblog en el modal */
.modal-devblog {}

.modal-meta {
    font-size: 0.82rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.modal-titulo {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 900;
    color: #111;
    margin-bottom: 24px;
    line-height: 1.2;
}

.modal-contenido {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

/* ── Footer ── */
footer {
    background: #0f0f0f;
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar { padding: 16px 20px; }

    .supercell-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 10px;
    }

    .modal-content {
        margin: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        position: fixed;
        bottom: 0;
        max-height: 90vh;
    }

    .devlog-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .devlog-meta { width: 100%; justify-content: flex-end; }
}