@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,400;0,700;1,400&display=swap');

html {
    height: 100%;
    background: linear-gradient(45deg, #ffe8f0, #0a0f33);
    background-size: 400% 400%;
    animation: colores 40s ease infinite;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    height: 100%;
    overflow: visible;
    font-family: "Comic Neue", monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    background: transparent;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes colores {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 50%;
        background-color: #0a0f33;
    }

    50% {
        background-position: 100% 50%;
        background-color: #66bb6a;
    }

    75% {
        background-position: 50% 50%;
        background-color: #1b2a5b;
    }

    100% {
        background-position: 0% 50%;
        background-color: #ffe8f0;
    }
}

#contador-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100vw;
    padding: 0 10px;
    box-sizing: border-box;
}

#contador {
    font-size: 3rem;
    letter-spacing: 2px;
    animation: latido 2s infinite;
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #contador {
        font-size: 2.5rem;
        gap: 3px;
    }
}

@media (max-width: 480px) {
    #contador {
        font-size: 2rem;
        gap: 2px;
    }
}

#contador span {
    display: inline-block;
    transition: transform 0.1s;
    flex-shrink: 0;
}

#contador span:hover {
    transform: scale(1.3);
}

@keyframes latido {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

#numero {
    margin-top: 10px;
    font-size: 1rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    text-align: center;
}

#mensaje {
    margin-top: 20px;
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
    width: 85%;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.flotando {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.corazon {
    position: absolute;
    bottom: -10px;
    color: rgba(255, 192, 203, 0.8);
    font-size: 1.5rem;
    animation: subir 10s infinite;
    cursor: pointer;
    transition: transform 0.1s;
    pointer-events: all;
}

.corazon:hover {
    transform: scale(1.3);
}

@keyframes subir {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

.explosion {
    position: fixed;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 1000;
}

@keyframes estallar {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot));
        opacity: 0;
    }
}

::selection {
    background: #ff4d82;
    color: white;
}

::-moz-selection {
    background: #ff4d82;
    color: white;
}

.back-button {
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 25px;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 182, 193, 0.4);
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(255, 192, 203, 0.7), 0 0 40px rgba(102, 187, 106, 0.3);
  transform: translateY(-2px) scale(1.02);
  color: #ffe8f0;
}
