@font-face {
    font-family: 'valentine-cute';
    src: url('/fonts/Valentine Cute.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'lemon-milk';
    src: url('/fonts/LEMONMILK-Light.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'beaming';
    src: url('/fonts/Beaming.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'vortigra';
    src: url('/fonts/Vortigra.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

* {
  cursor: url('/img/cursor.png') 0 0, auto !important;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: linear-gradient(-45deg, #d291bc, #f3c6e0, #f9a1bc, #c38edb);
    background-size: 2000% 2000%;
    animation: romanticGradient 8s ease-in-out infinite;
    color: #333;
    user-select: none;
}

@keyframes romanticGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.containero {
    text-align: center;
    background: rgba(255,255,255,0.85);
    padding-top: 2rem;
    padding-right: 2rem;
    padding-left: 2rem;
    border-radius: 0.9375rem; /* 15px */
    box-shadow: 0 0.5rem 1.25rem rgba(180, 50, 100, 0.2); /* 0 8px 20px */
    width: 37.5rem; /* 600px */
    margin-top: 5rem; /* 80px */
    margin-left: auto;
    margin-right: auto;
}

.title {
    font-family: 'lemon-milk', cursive;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #b30059;
}

#game-area {
    position: relative;
    width: 18.75rem; /* 300px */
    height: 18.75rem; /* 300px */
    margin: 1rem auto;
    background: #f9a1bc;
    border-radius: 0.9375rem; /* 15px */
    box-shadow: inset 0 0 0.9375rem #e6005c; /* 0 0 15px */
    overflow: hidden;
}

#heart {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    transition: left 0.3s ease, top 0.3s ease, transform 0.3s ease;
}

.score-timer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-weight: 600;
    padding-top: 1rem;
    margin: 1rem 0;
    font-size: 1.2rem;
    color: #800040;
    font-family: 'Segoe UI', sans-serif;
}

#start-btn {
    background: linear-gradient(135deg, #ff758c, #ff7eb3);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 1.5625rem; /* 25px */
    color: white;
    font-weight: 600;
    font-family: 'lemon-milk', sans-serif;
    cursor: pointer;
    transition: background 0.4s ease, transform 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 0.25rem 0.4375rem rgba(255, 92, 145, 0.3); /* 0 4px 7px */
}

#start-btn:hover {
    background: linear-gradient(135deg, #e6005c, #ff1a75);
    box-shadow: 0 0.5rem 1.25rem rgba(230, 0, 92, 0.3); /* 0 8px 20px */
    transform: scale(1.08);
}

#message {
    margin-top: 1rem;
    font-size: 1.3rem;
    color: #b30059;
    min-height: 1.5em;
    font-family: 'Segoe UI', sans-serif;
}

@keyframes pressDown {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.7);
    }
    100% {
        transform: scale(1);
    }
}

.heart-pressed {
    animation: pressDown 0.2s ease;
}

header {
    padding: 0.625rem; /* 10px */
}

.logo {
    height: 3.4375rem; /* 55px */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
    transform: scale(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 192, 203, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: white;
    border-radius: 1.25rem; /* 20px */
    padding: 2rem;
    width: 90%;
    max-width: 31.25rem; /* 500px */
    box-shadow: 0 0.5rem 1.25rem rgba(180, 50, 100, 0.2); /* 0 8px 20px */
    text-align: center;
}

.modal-content h2 {
    font-family: 'lemon-milk', cursive;
    font-size: 2rem;
    color: #b30059;
    margin-bottom: 1rem;
}

.modal-content h3 {
    margin-top: 3rem;
    font-family: 'lemon-milk', cursive;
    font-size: 1rem;
    color: #b30059;
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #800040;
}

#close-modal-btn {
    background: linear-gradient(135deg, #ff758c, #ff7eb3);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 1.5625rem; /* 25px */
    color: white;
    font-weight: 600;
    font-family: 'lemon-milk', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
}

#close-modal-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #e6005c, #ff1a75);
}

.modal-title {
    font-family: 'Segoe UI', sans-serif;
}

@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-out {
    animation: fadeOutScale 0.4s ease forwards;
}

.fade-in {
    animation: fadeInScale 0.4s ease forwards;
}

#countdown-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6); /* fondo oscuro transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#countdown-modal.show {
    visibility: visible;
    opacity: 1;
}

#countdown-number {
    font-size: 8rem;
    color: #fff;
    font-weight: bold;
    animation: pop 1s ease-in-out forwards;
    opacity: 0;
}

@keyframes pop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-buttons {
    padding-right: 5rem;
}

.nav-buttons a {
    display: inline-block;
    margin: 0 1rem;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #ff758c, #eb6ca1);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 1.5625rem; /* 25px */
    box-shadow: 0 0.25rem 0.4375rem rgba(255, 92, 145, 0.3); /* 0 4px 7px */
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    user-select: none;
    letter-spacing: 0.03em;
    font-family: 'lemon-milk', sans-serif;
}

.nav-buttons a:hover {
    background: linear-gradient(135deg, #e6005c, #ff1a75);
    box-shadow: 0 0.5rem 1.25rem rgba(230, 0, 92, 0.3); /* 0 8px 20px */
    transform: scale(1.08);
}

/* Responsive para móviles */
@media (max-width: 480px) {
  .containero {
    width: 90%;
    margin-top: 1rem;
    padding: 1rem;
  }

  .title{
    font-size: 1.4rem;
    margin-top:2.5rem!important;
  }

  .nav-buttons {
        display: none !important;
    }

    .mobile-nav.show {
        display: flex;
    }

  .nav-buttons a{
    font-size: 44%;
    padding: 2% 2%;
  }

  #game-area {
    width: 70vw;
    height: 70vw;
  }

    .logo {
        height: 2.5rem; 
    }
}


/* Estilo del botón hamburguesa */
.hamburger-btn {
    position: absolute;
    top: 1.2rem;
    right: 1rem;
    z-index: 1001;
    font-size: 2rem;
    background: none;
    border: none;
    color: #b30059;
    cursor: pointer;
}

/* Menú móvil oculto por defecto */
.mobile-nav {
    display: none;
    position: absolute;
    top: 4.5rem; /* debajo del botón */
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    flex-direction: column;
    padding: 1rem;
    z-index: 1000;
}

.mobile-nav a {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ff758c, #eb6ca1);
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    text-align: center;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'lemon-milk', sans-serif;
}

.mobile-nav a:hover {
    background: linear-gradient(135deg, #e6005c, #ff1a75);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    width: 100%;
    height: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.4s;
    perspective: 600px;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card .front,
.card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .front {
    background: #ffb6c1;
    transform: rotateY(180deg);
    font-size: 2rem;
}

.card .back {
    background: #f78da7;
    color: #fff;
    font-family: 'lemon-milk', sans-serif;
}

.particles {
    position: fixed;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff69b4;
    border-radius: 50%;
    opacity: 1;
    will-change: transform, opacity;
}