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

body {
    font-family: 'Cal Sans', 'Noto Sans', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

/* Title Screen */
#titleScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.title-container {
    text-align: center;
    animation: fadeInUp 1s ease;
}

.title-container h1 {
    font-size: 8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.title-container h2 {
    font-size: 2.5rem;
    color: #ffeb3b;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

.game-button {
    display: inline-block;
    background: #fff;
    color: #333;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    margin: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Character Select Screen */
#characterScreen {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%);
}

.character-container {
    text-align: center;
    max-width: 800px;
}

.character-container h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.character-card {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 3px solid transparent;
}

.character-card.active {
    border-color: #ffeb3b;
    background: rgba(255,255,255,0.2);
}

.character-card:hover:not(.locked) {
    transform: translateY(-5px);
}

.character-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.character-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.coming-soon {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 0.8rem;
}

/* Cutscene Screen */
#cutsceneScreen {
    background: #000;
}

.cutscene-container {
    text-align: center;
    max-width: 800px;
    position: relative;
}

.cutscene-text {
    background: rgba(0,0,0,0.7);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.cutscene-text p {
    font-size: 1.5rem;
    line-height: 1.6;
    animation: typewriter 2s ease;
}

.skip-button {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.skip-button:hover {
    background: rgba(255,255,255,0.3);
}

/* Game Screen */
#gameScreen {
    background: #87CEEB;
}

#gameContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#gameUI {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.jump-bar {
    width: 200px;
    height: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jump-bar.visible {
    opacity: 1;
}

.jump-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s ease;
}

#jumpPercent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.jump-height-display {
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jump-height-display.visible {
    opacity: 1;
}

#playersOnline {
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

.menu-button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.menu-button:hover {
    background: rgba(255,255,255,0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typewriter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .title-container h1 {
        font-size: 4rem;
    }
    
    .character-grid {
        grid-template-columns: 1fr;
    }
    
    .cutscene-text p {
        font-size: 1.2rem;
    }
    
    #gameUI {
        top: 10px;
        left: 10px;
    }
    
    .jump-bar {
        width: 150px;
    }
}