* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
#login-screen {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#login-screen.active {
    display: flex;
}

#app-screen.active {
    display: block;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: bounce-in 0.8s ease-out;
}

.hero-image-container {
    margin-bottom: 2rem;
}

.hero-image {
    width: 100%;
    max-width: 350px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.login-container h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.login-container p {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 2rem;
}

.login-form input {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    font-family: 'Comic Neue', cursive;
    text-align: center;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#login-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: transform 0.2s;
}

#login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Main App Screen */
header {
    background: white;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-content h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #4a5568;
}

.stats {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
}

.achievements {
    display: flex;
    gap: 0.5rem;
}

.achievement {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

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

.logout-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: transform 0.2s;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Journey Form */
.journey-form-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.journey-form-container h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.travel-options, .direction-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.travel-btn, .direction-btn {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Comic Neue', cursive;
}

.travel-btn:hover, .direction-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.travel-btn.selected, .direction-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.distance-input {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.distance-input input {
    padding: 1rem;
    font-size: 1.1rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    width: 150px;
    text-align: center;
    font-family: 'Comic Neue', cursive;
}

.distance-input select {
    padding: 1rem;
    font-size: 1.1rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    font-family: 'Comic Neue', cursive;
}

.date-input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem;
    font-size: 1.1rem;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    font-family: 'Comic Neue', cursive;
    text-align: center;
    display: block;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.log-journey-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Comic Neue', cursive;
    transition: transform 0.2s;
    margin-top: 1rem;
}

.log-journey-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Safety Reminder and Fun Fact */
.safety-reminder, .fun-fact {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    text-align: center;
}

.safety-reminder h3, .fun-fact h3 {
    font-family: 'Fredoka One', cursive;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.safety-reminder {
    border-left: 5px solid #f56565;
}

.fun-fact {
    border-left: 5px solid #4299e1;
}

/* Calendar */
.calendar-container {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calendar-container h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #4a5568;
    margin-bottom: 1.5rem;
    text-align: center;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-weight: bold;
    position: relative;
    min-height: 60px;
}

.calendar-day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-day.has-journey {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.journey-icons {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.journey-icon {
    font-size: 0.8rem;
}

/* Confetti Animation */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f39c12;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-right {
        flex-direction: column;
        gap: 1rem;
    }
    
    .travel-options, .direction-options {
        flex-direction: column;
    }
    
    .distance-input {
        flex-direction: column;
    }
    
    .distance-input input {
        width: 100%;
    }
    
    main {
        padding: 1rem;
    }
}