* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial Rounded MT Bold', 'Arial', sans-serif;
}

body {
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background-color: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.active {
    display: flex;
}

h1 {
    color: #4b0082;
    margin-bottom: 20px;
    font-size: 2rem;
}

h2 {
    color: #6a5acd;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

/* Level Selection Screen */
.level-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.level-btn {
    padding: 15px 20px;
    background-color: #9370db;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.level-btn:hover {
    background-color: #8a2be2;
    transform: scale(1.05);
}

/* Game Screen */
.journey-container {
    position: relative;
    width: 100%;
    height: 80px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rocket, .planet {
    font-size: 2rem;
    position: absolute;
    z-index: 2;
}

.rocket {
    left: 0;
    transition: left 0.5s ease-in-out;
}

.planet {
    right: 0;
}

.journey-path {
    position: absolute;
    height: 5px;
    width: 90%;
    background-color: #e0e0e0;
    border-radius: 5px;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.progress-text {
    position: absolute;
    bottom: -25px;
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    color: #4b0082;
}

.problem-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.numbers {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 30px;
    font-size: 2rem;
    min-width: 200px;
}

.operation {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.number {
    margin: 5px 0;
    padding: 5px;
    width: 100%;
    text-align: right;
}

.line {
    height: 3px;
    width: 100%;
    background-color: black;
    margin-top: 5px;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.option {
    padding: 15px 25px;
    background-color: #9370db;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    min-width: 120px;
    transition: all 0.2s ease;
}

.option:hover {
    background-color: #8a2be2;
    transform: scale(1.05);
}

.option.correct {
    background-color: #32cd32;
}

.option.incorrect {
    background-color: #ff4500;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Win Screen */
.win-animation {
    position: relative;
    width: 100%;
    height: 150px;
    margin: 30px 0;
}

.rocket-win {
    font-size: 3rem;
    position: absolute;
    left: 40%;
    top: 50%;
    transform: translateY(-50%);
    animation: pulse 1.5s infinite;
}

.planet-win {
    font-size: 3rem;
    position: absolute;
    right: 20%;
    top: 50%;
    transform: translateY(-50%);
    animation: pulse 1.5s infinite reverse;
}

@keyframes pulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); }
}

#play-again-btn {
    padding: 15px 30px;
    background-color: #4b0082;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#play-again-btn:hover {
    background-color: #8a2be2;
    transform: scale(1.05);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .numbers {
        font-size: 1.8rem;
    }
    
    .option {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .numbers {
        font-size: 1.5rem;
        min-width: 160px;
    }
    
    .option {
        font-size: 1rem;
        padding: 10px 15px;
        min-width: 100px;
    }
    
    .level-btn {
        font-size: 1rem;
        padding: 12px 15px;
    }
}
