/* Pac-Man Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    overflow: hidden;
}

.loading-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Pac-Man Circle */
.circle {
    position: relative;
    left: -100px;
    width: 0;
    height: 0;
    border: 50px solid #FDD835;
    border-radius: 50%;
    border-right-color: transparent;
    animation: move 5s linear 0s infinite normal forwards;
}

.circle:before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 0;
    height: 0;
    border: 50px solid #FDD835;
    border-radius: 50%;
    border-right-color: transparent;
    animation: chomp1 .25s ease-in-out 0s infinite normal forwards;
}

.circle:after {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 0;
    height: 0;
    border: 50px solid #FDD835;
    border-radius: 50%;
    border-right-color: transparent;
    animation: chomp2 .25s ease-in-out 0s infinite normal forwards;
}

/* Dots Container */
.dots {
    position: relative;
    top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot {
    position: relative;
    width: 10px;
    height: 10px;
    margin: 0 10px;
    border-radius: 50%;
    background: #1E88E5;
    animation: dot1 5s linear 0s infinite none normal;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.25s; }
.dot:nth-child(3) { animation-delay: 0.5s; }
.dot:nth-child(4) { animation-delay: 0.75s; }
.dot:nth-child(5) { animation-delay: 1s; }
.dot:nth-child(6) { animation-delay: 1.25s; }
.dot:nth-child(7) { animation-delay: 1.5s; }
.dot:nth-child(8) { animation-delay: 1.75s; }
.dot:nth-child(9) { animation-delay: 1.9s; }
.dot:nth-child(10) { animation-delay: 2.1s; }

/* Dots Container 2 (Red dots) */
.dots2 {
    position: relative;
    top: 50px;
    left: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dot2 {
    position: relative;
    left: -10px;
    width: 10px;
    height: 10px;
    margin: 0 10px;
    border-radius: 50%;
    background: #F44336;
    opacity: 0;
    animation: dot2 5s linear 0s infinite none normal;
}

.dot2:nth-child(10) { animation-delay: 2.5s; }
.dot2:nth-child(9) { animation-delay: 2.75s; }
.dot2:nth-child(8) { animation-delay: 3.0s; }
.dot2:nth-child(7) { animation-delay: 3.25s; }
.dot2:nth-child(6) { animation-delay: 3.5s; }
.dot2:nth-child(5) { animation-delay: 3.75s; }
.dot2:nth-child(4) { animation-delay: 4.0s; }
.dot2:nth-child(3) { animation-delay: 4.25s; }
.dot2:nth-child(2) { animation-delay: 4.5s; }
.dot2:nth-child(1) { animation-delay: 4.6s; }

/* Loading Text */
.loading-text {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #FDD835;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: textPulse 1.5s ease-in-out infinite;
}

.loading-text::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

/* Fade Out Animation */
.loading-screen.fade-out {
    animation: fadeOut 0.8s ease-out forwards;
}

/* Keyframes */
@keyframes chomp1 {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(45deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes chomp2 {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-45deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes move {
    0%, 100% {
        left: -100px;
    }
    0%, 48% {
        transform: rotateY(0deg);
    }
    50%, 100% {
        transform: rotateY(180deg);
    }
    50% {
        left: 100%;
    }
}

@keyframes dot1 {
    0%, 4% {
        background: #1E88E5;
        opacity: 1;
    }
    5%, 94% {
        background: #F44336;
        opacity: 0;
    }
    95%, 100% {
        background: #1E88E5;
        opacity: 1;
    }
}

@keyframes dot2 {
    0%, 4% {
        background: #F44336;
        opacity: 1;
    }
    5%, 94% {
        opacity: 0;
    }
    95%, 100% {
        background: #F44336;
        opacity: 1;
    }
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) scale(0.95);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

@keyframes dots {
    0%, 25% { content: ''; }
    50% { content: '.'; }
    75% { content: '..'; }
    100% { content: '...'; }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .circle {
        border-width: 35px;
        left: -70px;
    }

    .circle:before,
    .circle:after {
        border-width: 35px;
        top: -35px;
        left: -35px;
    }

    .dot,
    .dot2 {
        width: 8px;
        height: 8px;
        margin: 0 8px;
    }

    .loading-text {
        font-size: 14px;
        letter-spacing: 2px;
        bottom: -60px;
    }
}

