@font-face {
    font-family: 'Intro';
    src: url('intro.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background: url('img/footfon.jfif') no-repeat center center;
    background-size: cover;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    touch-action: none;
    /* Additional touch protection */
}

/* Rest of your original CSS remains the same */
.floating-text {
    position: fixed;
    top: 20px;
    font-family: 'Intro', sans-serif;
    font-size: 36px;
    color: #fff;
    text-shadow: 0 0 10px #ff3300,
        0 0 20px #ff3300,
        0 0 30px #ff6600,
        0 0 40px #ff9900;
    animation: floatTextComplex 6s ease-in-out infinite;
    z-index: 1000;
}

@keyframes floatTextComplex {
    0% {
        transform: translateX(-50px) translateY(0);
    }

    25% {
        transform: translateX(50px) translateY(-20px);
    }

    50% {
        transform: translateX(-30px) translateY(15px);
    }

    75% {
        transform: translateX(30px) translateY(-10px);
    }

    100% {
        transform: translateX(-50px) translateY(0);
    }
}

.goal-container {
    width: 90%;
    max-width: 500px;
    position: relative;
    display: grid;
    justify-content: center;
    align-items: center;
    background: url('img/varana.png') no-repeat center center;
    background-size: contain;
    padding-top: 10%;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-row-gap: 10px;
    column-gap: 5px;
    z-index: 1;
}

.circle {
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    background-image: url('img/ball.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    place-self: center;
    transform: translateY(-22px);
    transition: opacity 0.3s ease;
}

.circle.hidden {
    opacity: 0;
}

.pulsating {
    background-image: url('img/ballred.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1s infinite;
    transform: translateY(-22px) scale(1);
}

.replaced {
    background-image: url('img/football.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(-22px) scale(0);
    animation: appear 0.5s forwards ease-in-out;
}

@keyframes pulse {
    0% {
        transform: translateY(-22px) scale(1);
    }

    50% {
        transform: translateY(-22px) scale(1.2);
    }

    100% {
        transform: translateY(-22px) scale(1);
    }
}

@keyframes appear {
    from {
        transform: translateY(-22px) scale(0);
        opacity: 0;
    }

    to {
        transform: translateY(-22px) scale(1.2);
        opacity: 1;
    }
}

.kick-button {
    font-family: 'Intro', sans-serif;
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 20px;
    background: linear-gradient(45deg, #ff0066, #ff3300);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.kick-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.6);
    background: linear-gradient(45deg, #ff3300, #ff0066);
}

.kick-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.4);
}

.back-button {
    font-family: 'Intro', sans-serif;
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 20px;
    background: linear-gradient(45deg, #ff0066, #ff3300);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.6);
    background: linear-gradient(45deg, #ff3300, #ff0066);
}

.back-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.4);
}

.counter-container {
    width: 100%;
    max-width: 500px;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.counter {
    width: 80%;
    max-width: 500px;
    height: 20px;
    background: transparent;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
    margin-top: 55%;
    border: 2px solid white;
    overflow: hidden;
}

.fill {
    background-color: #6f9c59;
    border-radius: 25px;
    height: 100%;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    transition: width 0.5s ease;
}

.dot {
    position: relative;
    z-index: 1;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    margin-left: 33px;
}

.dot:first-child {
    margin-left: 50;
}

.dot:last-child {
    margin-left: 50;
    margin-right: -17px;
}

.dot.active {
    background-color: white;
}

.labels {
    display: flex;
    justify-content: space-between;
    width: 80%;
    max-width: 500px;
    margin-top: 10px;
    padding-left: 45px;
    margin-bottom: 10%;
}

.labels span {
    font-family: 'Intro', sans-serif;
    font-size: 18px;
    color: #16588a;
    font-style: italic;
    font-weight: bold;
    text-shadow: 3px 3px 6px white, -3px -3px 6px white, 3px -3px 6px white, -3px 3px 6px white;
}

@media (max-height: 632px) {
    .counter-container {
        width: 100%;
        margin-top: -22%;
    }

    .counter {
        height: 10px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .goal-container {
        grid-row-gap: 3px;
        column-gap: 2px;
    }
}

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}