* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page {
    display: none;
    text-align: center;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.page.active {
    display: flex;
}

#startPage {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=1920&q=80') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

#startPage::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, rgba(238, 119, 82, 0.3), rgba(231, 60, 126, 0.3), rgba(35, 166, 213, 0.3), rgba(35, 213, 171, 0.3));
    background-size: 400% 400%;
    animation: gradientMove 10s ease infinite;
}

#startPage h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    font-weight: bold;
    letter-spacing: 2px;
}

#calculatorPage {
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
        url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=1920&q=80') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

#calculatorPage::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, rgba(250, 112, 154, 0.4), rgba(254, 225, 64, 0.4));
    background-size: 400% 400%;
    animation: gradientMove 10s ease infinite;
}

#calculatorPage h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 15px rgba(0,0,0,0.4);
    font-weight: bold;
}

#fuelForm {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.3);
    min-width: 320px;
    position: relative;
    z-index: 1;
    border: 2px solid rgba(255,255,255,0.5);
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: bold;
}

.input-group input {
    width: 100%;
    padding: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem 3.5rem;
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.7);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

#resultPage {
    position: relative;
}

#resultPage.success {
    background: linear-gradient(-45deg, #56ab2f, #a8e063, #56ccf2, #2f80ed);
    background-size: 400% 400%;
    animation: gradientMove 8s ease infinite;
}

#resultPage.failure {
    background: linear-gradient(-45deg, #ff512f, #dd2476, #f09819, #ff512f);
    background-size: 400% 400%;
    animation: gradientMove 8s ease infinite;
}

#resultPage h1 {
    color: white;
    font-size: 3rem;
    padding: 2rem;
    text-shadow: 0 0 30px rgba(0,0,0,0.6);
    animation: bounceIn 0.8s ease;
    font-weight: bold;
}

#maxDistance {
    color: white;
    font-size: 1.5rem;
    margin-top: 1rem;
}

#resetBtn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
}

.fuel-option-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.fuel-option-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #333;
    font-weight: normal;
}

.fuel-option-toggle input[type="radio"] {
    cursor: pointer;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-100px) translateX(100px); }
}

@keyframes slide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}
