/* ===================================
   GLOBAL STYLES & RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background:
        linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%),
        url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') center/cover;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Floating particles animation */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 215, 0, 0.5), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 215, 0, 0.6), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255, 215, 0, 0.4), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: floatingParticles 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes backgroundShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    25% {
        opacity: 0.8;
        transform: scale(1.05) rotate(1deg);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.1) rotate(0deg);
    }

    75% {
        opacity: 0.7;
        transform: scale(1.05) rotate(-1deg);
    }
}

@keyframes floatingParticles {
    0% {
        transform: translateY(100vh) translateX(0px);
    }

    100% {
        transform: translateY(-100px) translateX(100px);
    }
}

/* ===================================
   FORM PAGE WRAPPER
   =================================== */
.form-page-wrapper {
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===================================
   FORM CONTAINER - GLASSMORPHISM
   =================================== */
.form-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5);
    animation: slideUp 0.8s ease-out;
    margin: 20px 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   FORM HEADER
   =================================== */
.form-header {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeInDown 1s ease-out 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin: 0;
}

/* ===================================
   FORM GROUPS
   =================================== */
.form-group {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out both;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.15s;
}

.form-group:nth-child(3) {
    animation-delay: 0.2s;
}

.form-group:nth-child(4) {
    animation-delay: 0.25s;
}

.form-group:nth-child(5) {
    animation-delay: 0.3s;
}

.form-group:nth-child(6) {
    animation-delay: 0.35s;
}

.form-group:nth-child(7) {
    animation-delay: 0.4s;
}

.form-group:nth-child(8) {
    animation-delay: 0.45s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===================================
   FORM INPUTS & CONTROLS
   =================================== */
.form-control,
.form-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(51, 51, 51, 0.5);
}

.form-control[readonly] {
    background: rgba(255, 255, 255, 0.6);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ===================================
   CHECKBOX STYLING
   =================================== */
.form-check-wrapper {
    margin: 28px 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-check-label {
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.terms-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #ffed4e;
    text-decoration: underline;
}

/* ===================================
   INFO SECTION
   =================================== */
.info-section {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid rgba(255, 215, 0, 0.8);
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.info-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffd700;
    font-weight: bold;
    font-size: 16px;
}

.info-list li:last-child {
    margin-bottom: 0;
}

.highlight-text {
    background: rgba(255, 215, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
}

/* ===================================
   EVENT DETAILS & ERROR MESSAGES
   =================================== */
#sport_event_details {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#sport_event_details input[type="checkbox"] {
    margin-right: 10px;
    margin-bottom: 8px;
    accent-color: #ffd700;
    transform: scale(1.2);
}

#sport_event_details label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-right: 20px;
    margin-bottom: 8px;
    display: inline-block;
    cursor: pointer;
    transition: color 0.3s ease;
}

#sport_event_details label:hover {
    color: #ffd700;
}

.age-error-message {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 107, 107, 0.3);
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: errorPulse 2s infinite;
}

@keyframes errorPulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
        transform: scale(1.02);
    }
}

/* Custom Alert Styles */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-weight: 500;
    text-align: center;
    max-width: 90%;
    animation: alertSlideIn 0.3s ease;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ===================================
   SUBMIT BUTTON
   =================================== */
.form-actions {
    margin-top: 30px;
    animation: fadeInUp 0.6s ease-out 0.7s both;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-submit:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.4);
}

/* ===================================
   FOOTER
   =================================== */
.footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeIn 1s ease-out 0.8s both;
}

.footer-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #ffed4e;
}

/* ===================================
   TWO-ROW LAYOUT FOR BETTER ORGANIZATION
   =================================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-full-width {
    grid-column: 1 / -1;
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE
   =================================== */
@media (max-width: 768px) {
    body {
        padding: 8px;
        background-attachment: scroll;
        /* Better mobile performance */
    }

    .form-container {
        padding: 20px 15px;
        border-radius: 16px;
        margin: 10px 0;
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(15px);
    }

    .form-title {
        font-size: 24px;
        line-height: 1.2;
    }

    .form-subtitle {
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-control,
    .form-select {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
        border-radius: 10px;
    }

    .info-list li {
        font-size: 12px;
        line-height: 1.6;
    }

    #sport_event_details {
        padding: 12px;
    }

    #sport_event_details label {
        font-size: 13px;
        margin-right: 15px;
    }

    .age-error-message {
        padding: 12px 15px;
        font-size: 14px;
    }

    .custom-alert {
        padding: 15px 20px;
        max-width: 85%;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .form-container {
        padding: 15px 12px;
        border-radius: 12px;
    }

    .form-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 14px;
    }

    .info-section {
        padding: 15px;
    }

    .info-list li {
        font-size: 11px;
        padding-left: 20px;
    }

    #sport_event_details {
        padding: 10px;
    }

    #sport_event_details label {
        font-size: 12px;
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .age-error-message {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ===================================
   LEGACY STYLES (for compatibility)
   =================================== */
.head {
    text-align: center;
    padding: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
}

button {
    background-color: #ff4500;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #e03e00;
}

a {
    text-decoration: none;
}

/* Modal Styles */
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 5px;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid #1b1919;
    padding: 8px;
    text-align: center;
}

th,
td {
    background-color: white;
}

td {
    color: black;
}

.note {
    margin-top: 20px;
    font-size: 0.9em;
}

.contact {
    margin-top: 10px;
    font-size: 1em;
}

@media (max-width: 600px) {
    .container {
        padding: 5px;
    }

    th,
    td {
        font-size: 0.9em;
    }
}

/* ===================================
   CREATIVE LOADING SCREEN ANIMATIONS
   =================================== */

/* Runner Container - Main wrapper with animated gradient background */
.runner-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin-bottom: 40px;
    perspective: 1000px;
}

/* Runner Scene - 3D animated container */
.runner-scene {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 215, 0, 0.15) 100%);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
    animation: sceneFloat 4s ease-in-out infinite, scenePulse 2s ease-in-out infinite;
}

@keyframes sceneFloat {

    0%,
    100% {
        transform: translateY(0px) rotateX(0deg);
    }

    50% {
        transform: translateY(-10px) rotateX(2deg);
    }
}

@keyframes scenePulse {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), inset 0 0 30px rgba(255, 215, 0, 0.1);
    }

    50% {
        box-shadow: 0 15px 50px rgba(255, 215, 0, 0.4), inset 0 0 40px rgba(255, 215, 0, 0.2);
    }
}

/* Start Line - Animated starting position */
.start-line {
    position: absolute;
    left: 15%;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 80px;
    background: linear-gradient(180deg,
            transparent 0%,
            #ffd700 10%,
            #ffffff 50%,
            #ffd700 90%,
            transparent 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: startLinePulse 1.5s ease-in-out infinite;
    z-index: 1;
}

.start-line::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd700 0%, transparent 70%);
    border-radius: 50%;
    animation: startLineGlow 1.5s ease-in-out infinite;
}

.start-line::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd700 0%, transparent 70%);
    border-radius: 50%;
    animation: startLineGlow 1.5s ease-in-out infinite 0.75s;
}

@keyframes startLinePulse {

    0%,
    100% {
        opacity: 0.7;
        transform: translateY(-50%) scaleY(1);
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) scaleY(1.1);
    }
}

@keyframes startLineGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* Runner - Animated running character */
.runner {
    position: relative;
    font-size: 64px;
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation:
        runnerBounce 0.6s ease-in-out infinite,
        runnerMove 3s ease-in-out infinite,
        runnerGlow 2s ease-in-out infinite;
}

@keyframes runnerBounce {

    0%,
    100% {
        transform: translateY(0px) rotate(-5deg) scale(1);
    }

    50% {
        transform: translateY(-15px) rotate(5deg) scale(1.05);
    }
}

@keyframes runnerMove {
    0% {
        left: -20px;
    }

    50% {
        left: 20px;
    }

    100% {
        left: -20px;
    }
}

@keyframes runnerGlow {

    0%,
    100% {
        filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    }

    50% {
        filter: drop-shadow(0 8px 25px rgba(255, 215, 0, 0.6));
    }
}

/* Track - Animated running track with moving lines */
.track {
    position: absolute;
    bottom: 30%;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 20%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.3) 80%,
            transparent 100%);
    overflow: hidden;
}

.track::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            transparent 0px,
            transparent 20px,
            rgba(255, 215, 0, 0.8) 20px,
            rgba(255, 215, 0, 0.8) 30px,
            transparent 30px,
            transparent 50px);
    animation: trackMove 2s linear infinite;
}

.track::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 7px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 215, 0, 0.2) 50%,
            transparent 100%);
    animation: trackGlow 1.5s ease-in-out infinite;
}

@keyframes trackMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50px);
    }
}

@keyframes trackGlow {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

/* Loading Text Container - Animated text wrapper */
.loading-text-container {
    text-align: center;
    animation: textContainerFloat 3s ease-in-out infinite;
}

@keyframes textContainerFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Enhanced Loading Text with gradient and glow */
.loading-text {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg,
            #ffffff 0%,
            #ffd700 25%,
            #ffffff 50%,
            #ffd700 75%,
            #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        textShimmer 3s linear infinite,
        textPulse 2s ease-in-out infinite;
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
}

@keyframes textShimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes textPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Enhanced Loading Dots with bounce and color change */
.loading-dots {
    display: inline-flex;
    gap: 8px;
    margin-left: 10px;
    align-items: center;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 50%;
    box-shadow:
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 20px rgba(255, 215, 0, 0.3);
    animation:
        dotBounce 1.2s infinite ease-in-out both,
        dotColorChange 2s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s, 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s, 0.4s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s, 0.8s;
}

@keyframes dotColorChange {

    0%,
    100% {
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
    }

    50% {
        background: linear-gradient(135deg, #ffffff 0%, #ffd700 100%);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

/* Enhanced Loading Subtext */
.loading-subtext {
    font-size: 14px;
    opacity: 0.95;
    margin-top: 10px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: subtextFade 2s ease-in-out infinite;
    letter-spacing: 1px;
}

@keyframes subtextFade {

    0%,
    100% {
        opacity: 0.7;
        transform: translateY(0px);
    }

    50% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Add particle effects to the loading screen background */
.index-loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: particleFloat 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes particleFloat {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    25% {
        opacity: 0.8;
        transform: scale(1.1) rotate(5deg);
    }

    50% {
        opacity: 0.9;
        transform: scale(1.15) rotate(0deg);
    }

    75% {
        opacity: 0.7;
        transform: scale(1.1) rotate(-5deg);
    }
}

/* Add sparkle effects */
.index-loading-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 15% 25%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 85% 35%, rgba(255, 215, 0, 0.9), transparent),
        radial-gradient(2px 2px at 45% 65%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 75% 85%, rgba(255, 215, 0, 0.8), transparent),
        radial-gradient(2px 2px at 25% 75%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 65% 15%, rgba(255, 215, 0, 0.7), transparent);
    background-size: 100% 100%;
    animation: sparkle 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .runner-scene {
        height: 150px;
    }

    .runner {
        font-size: 48px;
    }

    .loading-text {
        font-size: 24px;
    }

    .loading-subtext {
        font-size: 12px;
    }

    .start-line {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .runner-scene {
        height: 120px;
    }

    .runner {
        font-size: 40px;
    }

    .loading-text {
        font-size: 20px;
    }

    .loading-subtext {
        font-size: 11px;
    }

    .start-line {
        height: 50px;
    }

    .loading-dots span {
        width: 8px;
        height: 8px;
    }
}
