/* Index Interface Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    overflow-x: hidden; /* Keep this to prevent horizontal scrolling */
    padding: 1rem;
    position: relative; /* Added for better positioning context */
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px; /* Added max-width for better control */
    position: relative;
    overflow: hidden; /* Contains floating elements */
}

/* Animation Scene Container */
.animation-scene {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 20px 0;
    overflow: hidden; /* Important: contains animations */
}

/* Modified animations to use translateX instead of left property */
@keyframes fly {
    0% {
        transform: translateX(-60px) translateY(0);
    }
    50% {
        transform: translateX(50vw) translateY(20px);
    }
    100% {
        transform: translateX(100vw) translateY(0);
    }
}

@keyframes float-box {
    0% {
        transform: translateX(100%) rotate(0deg);
    }
    100% {
        transform: translateX(-100%) rotate(360deg);
    }
}

@keyframes robot-walk {
    0% {
        transform: translateX(-60px);
    }
    100% {
        transform: translateX(100%);
    }
}

.spaceship {
    position: absolute;
    width: 60px;
    height: 30px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    clip-path: polygon(0% 50%, 20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%);
    animation: fly 8s linear infinite;
    top: 30px;
    will-change: transform;
}

@keyframes fly {
    0% {
        left: -60px;
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
    100% {
        left: 100%;
        transform: translateY(0);
    }
}

/* Box */
.box {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #8b4513;
    border: 3px solid #654321;
    animation: float-box 6s linear infinite;
    will-change: transform;
}

.box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: #654321;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
}

@keyframes float-box {
    0% {
        left: 100%;
        transform: rotate(0deg);
    }
    100% {
        left: -40px;
        transform: rotate(360deg);
    }
}

/* Robot */
.robot {
    position: absolute;
    width: 60px;
    height: 90px;
    bottom: 20px;
    animation: robot-walk 10s linear infinite;
    will-change: transform;
}

.robot-head {
    width: 40px;
    height: 40px;
    background: #808080;
    border-radius: 10px;
    position: relative;
    margin: 0 auto;
}

.robot-eye {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    animation: blink 1s infinite;
}

.robot-eye.left { left: 5px; }
.robot-eye.right { right: 5px; }

.robot-body {
    width: 50px;
    height: 40px;
    background: #a0a0a0;
    margin: 5px auto;
    border-radius: 5px;
    position: relative;
}

.robot-arm {
    width: 10px;
    height: 30px;
    background: #808080;
    position: absolute;
    top: 0;
    animation: wave 1s infinite;
}

.robot-arm.left {
    left: -10px;
    transform-origin: top;
    animation: wave-left 1s infinite;
}

.robot-arm.right {
    right: -10px;
    transform-origin: top;
    animation: wave-right 1s infinite;
}

.robot-leg {
    width: 15px;
    height: 20px;
    background: #808080;
    position: absolute;
    bottom: -20px;
}

.robot-leg.left { left: 5px; }
.robot-leg.right { right: 5px; }

@keyframes robot-walk {
    0% { left: -60px; }
    100% { left: 100%; }
}

@keyframes blink {
    0%, 45%, 55%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes wave-left {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(20deg); }
}

@keyframes wave-right {
    0%, 100% { transform: rotate(20deg); }
    50% { transform: rotate(-20deg); }
}

/* Dollar Symbol */
.dollar {
    position: absolute;
    font-size: 40px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0,255,0,0.5);
    animation: float-dollar 4s ease-in-out infinite;
}

@keyframes float-dollar {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.countdown {
    font-size: 6rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 2rem 0;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}
.floating-shapes div {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.welcome-text {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.time {
    font-size: 1.5rem;
    margin-top: 2rem;
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.redirect-text {
    text-align: center;
    font-size: 1.2rem;
    margin-top: 1rem;
}

.mouse-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
}

/* Responsive Breakpoints */
@media (max-width: 600px) {
    .countdown { font-size: 5rem; }
    .welcome-text { font-size: 2rem; }
    .time { font-size: 1.3rem; }
}

@media (max-width: 500px) {
    .countdown { font-size: 4rem; }
    .welcome-text { font-size: 1.8rem; }
    .time { font-size: 1.2rem; }
    .container { padding: 0.8rem; }
}

@media (max-width: 400px) {
    .countdown { font-size: 3.5rem; }
    .welcome-text { font-size: 1.5rem; }
    .time { font-size: 1.1rem; }
    .container { padding: 0.6rem; }
}

@media (max-width: 300px) {
    .countdown { font-size: 3rem; }
    .welcome-text { font-size: 1.2rem; }
    .time { font-size: 1rem; }
    .container { padding: 0.4rem; }
    .redirect-text { font-size: 0.9rem; }
}

@media (max-width: 250px) {
    .countdown { font-size: 2.5rem; }
    .welcome-text { font-size: 1rem; }
    .time { font-size: 0.9rem; }
    .container { padding: 0.3rem; }
    .redirect-text { font-size: 0.8rem; }
}