@import url('https://fonts.googleapis.com/css2?family=Aldrich&family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.04em;
}

.title1 {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(
        120deg,
        #7dd3fc 0%,
        #e0f2fe 25%,
        #38bdf8 50%,
        #bae6fd 75%,
        #7dd3fc 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: title-shimmer 3.5s linear infinite,
               title-glow 2.5s ease-in-out infinite;
}

@keyframes title-shimmer {
    to {
        background-position: 200% center;
    }
}

@keyframes title-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(125, 211, 252, 0.35));
    }

    50% {
        filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.7));
    }
}

.title2 {
    opacity: 0;
    text-align: center;
    background: linear-gradient(90deg, #fff 0%, #cbd5e1 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: line-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards,
               tagline-shine 5s linear 1.2s infinite;
}

@keyframes line-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes tagline-shine {
    to {
        background-position: 200% center;
    }
}

.content {
    color: white;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 100vh;
    padding: 100px 24px 40px;
}

#stats-form {
    width: min(100%, 650px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(to bottom, #101d30, #0a0a0a);
    border: 1px solid #3b8df2;
    border-radius: 12px;
    animation: form-animation 0.5s ease-in-out;
}

#stats-form label {
    display: block;
    width: 100%;
    line-height: 1.6;
}

#stats-form .input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 2px solid #3b8df2;
    border-radius: 5px;
    background-color: #101d30;
    color: #fff;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.2s ease,
                border-color 0.2s ease;
}

/* Stable hover effect: no scaling, movement, or layout changes */
#stats-form .input:hover {
    background-color: #172943;
    border-color: #7dd3fc;
}

#stats-form .input:focus {
    background-color: #172943;
    border-color: #7dd3fc;
    outline: 2px solid rgba(125, 211, 252, 0.25);
    outline-offset: 2px;
}

#stats-form .input::placeholder {
    color: #cbd5e1;
}

@keyframes form-animation {
    from {
        transform: rotateX(-10deg);
        opacity: 0;
    }

    to {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.button {
    padding: 15px 20px;
    border: none;
    border-radius: 5px;
    background-color: lightpink;
    color: white;
    font-size: 16px;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.4) 0 2px 4px,
                rgba(0, 0, 0, 0.3) 0 7px 13px -3px;
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.button:hover {
    background-color: #ec8fb5;
    transform: scale(1.02);
}

.button:active {
    transform: scale(0.98);
}

.button:focus-visible {
    outline: 2px solid #7dd3fc;
    outline-offset: 3px;
}

.login {
    background-color: lightcoral;
    color: black;
    padding: 20px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease,
                transform 0.2s ease;
}

.login:hover {
    transform: scale(1.05);
    background-color: lightsalmon;
}

.login:active {
    transform: scale(0.98);
}

p {
    color: lightblue;
    font-size: 15px;
}

@media (max-width: 480px) {
    .content {
        padding: 88px 16px 32px;
    }

    #stats-form {
        padding: 18px;
    }

    .title1 {
        overflow-wrap: anywhere;
    }
}

@media (prefers-reduced-motion: reduce) {
    .title1,
    .title2,
    #stats-form {
        animation: none;
    }

    .title2 {
        opacity: 1;
    }

    #stats-form .input,
    .button,
    .login {
        transition: none;
    }
}

/* Fix input interaction and preserve stable hover effects */
#stats-form {
  position: relative;
  isolation: isolate;
}

#stats-form label {
  position: relative;
  z-index: 1;
}

#stats-form input,
#stats-form textarea,
#stats-form select {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  color: #ffffff;
  caret-color: #7dd3fc;
}

#stats-form input:focus,
#stats-form textarea:focus,
#stats-form select:focus {
  background-color: #172943;
  border-color: #7dd3fc;
  outline: 2px solid rgba(125, 211, 252, 0.25);
  outline-offset: 2px;
}