/* ==========================================
   css/estilos.css
   ========================================== */
:root {
    --fondo: #FFFBF0;
    --texto: #4A4257;
    --azul: #A0C4FF;
    --rosa: #FFC6D0;
    --verde: #B5EAD7;
    --salmon: #FF9AA2;
    --lila: #CDB4DB;
    --pixel: 'Press Start 2P', cursive;
}

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

body {
    font-family: var(--pixel);
    background: var(--fondo);
    background-image: radial-gradient(rgba(74, 66, 87, 0.1) 10%, transparent 10%);
    background-size: 20px 20px;
    color: var(--texto);
    line-height: 1.6;
}

/* HEADER */
.header {
    background: var(--azul);
    padding: 20px 0;
    border-bottom: 4px solid var(--texto);
    text-align: center;
    box-shadow: 0 6px 0 rgba(74, 66, 87, 0.1);
}

.header-title {
    color: var(--fondo);
    font-size: clamp(12px, 4vw, 18px);
    text-shadow: 3px 3px 0 var(--texto);
    padding: 0 10px;
}

/* CONTAINER */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* CARRUSEL */
.display-area {
    position: relative;
    border: 6px solid var(--texto);
    border-radius: 15px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: 10px 10px 0 rgba(74, 66, 87, 0.1);
}

.display-area::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

.carousel {
    position: relative;
    height: 400px;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.slide-content {
    background: rgba(74, 66, 87, 0.8);
    color: var(--fondo);
    width: 100%;
    padding: 15px;
    font-size: clamp(8px, 2vw, 10px);
    border-top: 3px solid var(--salmon);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--salmon);
    border: 3px solid var(--texto);
    color: var(--fondo);
    padding: 10px;
    cursor: pointer;
    z-index: 3;
    font-family: var(--pixel);
    box-shadow: 3px 3px 0 var(--texto);
    font-size: 20px;
}

.carousel-nav:active {
    transform: translateY(-45%);
    box-shadow: none;
}

/* INFO BOX */
.info-box {
    background: white;
    border: 4px solid var(--texto);
    padding: 20px;
    margin-top: 40px;
    box-shadow: 8px 8px 0 var(--verde);
    position: relative;
}

.info-box::before {
    content: '★ INFO';
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--rosa);
    padding: 5px 10px;
    border: 3px solid var(--texto);
    font-size: clamp(8px, 2vw, 10px);
}

.info-text {
    font-family: sans-serif;
    font-size: clamp(13px, 3vw, 15px);
    line-height: 1.6;
}

/* JUEGO */
.game-section {
    text-align: center;
    margin-top: 50px;
    padding: 30px 20px;
    background: var(--azul);
    border: 4px solid var(--texto);
    border-radius: 15px;
    color: var(--texto);
    box-shadow: 10px 10px 0 rgba(74, 66, 87, 0.1);
}

.game-section h1 {
    font-size: clamp(10px, 3vw, 14px);
    margin-bottom: 10px;
}

.game-section p {
    font-size: clamp(8px, 2vw, 10px);
}

.start-btn {
    background: var(--salmon);
    border: 4px solid var(--texto);
    padding: 15px 30px;
    font-family: var(--pixel);
    color: var(--fondo);
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--texto);
    margin-top: 20px;
    font-size: clamp(10px, 2.5vw, 12px);
    width: 100%;
    max-width: 300px;
}

.start-btn:active {
    box-shadow: 0 0 0;
    transform: translate(6px, 6px);
}

/* COMENTARIOS */
.comments-section {
    margin-top: 60px;
    padding: 20px;
    background: white;
    border: 4px solid var(--texto);
    box-shadow: 8px 8px 0 var(--rosa);
}

.comments-section h2 {
    font-size: clamp(10px, 2.5vw, 12px);
    color: var(--texto);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.comment-input {
    padding: 15px;
    border: 3px solid var(--texto);
    font-family: sans-serif;
    width: 100%;
    background: #fafafa;
    margin-bottom: 10px;
    font-size: 14px;
}

.comment-item {
    background: #fff;
    padding: 15px;
    border: 2px solid var(--texto);
    border-left: 8px solid var(--verde);
    margin-bottom: 15px;
    font-family: sans-serif;
    box-shadow: 3px 3px 0 #eee;
}

.comment-name {
    font-weight: bold;
    color: var(--texto);
    font-size: clamp(8px, 2vw, 10px);
    font-family: var(--pixel);
    margin-bottom: 5px;
    display: block;
}
/* Bloquear redimensionamiento de comentarios */
textarea.comment-input {
    resize: none;
    overflow-y: auto;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 66, 87, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--fondo);
    border: 6px solid var(--texto);
    padding: 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.memory-card {
    aspect-ratio: 1;
    background: var(--azul);
    border: 3px solid var(--texto);
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.card-back,
.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(16px, 4vw, 20px);
}

.card-front {
    transform: rotateY(180deg);
    background: white;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    font-size: clamp(8px, 2vw, 10px);
    margin-bottom: 15px;
    background: var(--verde);
    padding: 10px;
    border: 3px solid var(--texto);
    flex-wrap: wrap;
    gap: 10px;
}

/* FOOTER NUEVO CON CRÉDITOS */
.footer {
    background: var(--texto);
    color: var(--fondo);
    padding: 40px 20px;
    border-top: 4px solid var(--verde);
    margin-top: 60px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
}

.footer-logos {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-logos img {
    height: 80px;
    width: auto;
    filter: grayscale(100%) brightness(300%) drop-shadow(3px 3px 0 var(--verde));
    image-rendering: pixelated;
}

.footer-info {
    font-size: clamp(7px, 2vw, 9px);
    line-height: 2;
}

.footer-credits {
    font-size: clamp(6px, 1.8vw, 8px);
    line-height: 1.8;
    opacity: 0.9;
    margin-top: 10px;
}

.footer-credits strong {
    color: var(--verde);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
    .carousel {
        height: 300px;
    }

    .container {
        padding: 15px;
    }

    .info-box,
    .game-section,
    .comments-section {
        padding: 20px 15px;
    }

    .memory-game {
        gap: 5px;
    }

    .modal-content {
        padding: 15px;
    }

    .carousel-nav {
        padding: 8px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .carousel {
        height: 250px;
    }

    .memory-game {
        grid-template-columns: repeat(3, 1fr);
    }

    .display-area,
    .info-box,
    .game-section,
    .comments-section {
        border-width: 3px;
    }

    .start-btn {
        padding: 12px 20px;
    }
}

/* Tablets landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 750px;
    }

    .carousel {
        height: 450px;
    }
}