@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

/* 상단 광고 스타일 */
.ad-top {
    width: 100%;
    height: 90px;
    max-height: 90px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ad-top ins {
    display: block !important;
    width: 100% !important;
    height: 90px !important;
    max-height: 90px !important;
    margin: 0 auto;
}

/* 모바일에서의 광고 크기 조정 */
@media (max-width: 768px) {
    .ad-top {
        height: 50px;
        max-height: 50px;
    }
    
    .ad-top ins {
        height: 50px !important;
        max-height: 50px !important;
    }
}

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 90px;
}

.ad-top, .ad-bottom {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.game-container {
    width: 100%;
    max-width: 800px;
    height: auto;
    aspect-ratio: 4/3;
    background: #E0F6FF;
    border: 4px solid #333;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    margin: auto;
}

.game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 70%, #90EE90 100%);
    position: relative;
}

.ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #333;
    font-size: 12px;
    z-index: 10;
}

.high-score {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #333;
    font-size: 12px;
    z-index: 10;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border: 3px solid #333;
    border-radius: 10px;
    text-align: center;
    display: none;
    z-index: 20;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.game-over h2 {
    color: #FF6B6B;
    margin-bottom: 15px;
    font-size: 16px;
}

.game-over p {
    margin: 10px 0;
    font-size: 10px;
    color: #333;
}

.restart-btn {
    background: #4ECDC4;
    color: white;
    border: 2px solid #333;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
    margin-top: 15px;
    border-radius: 5px;
    transition: all 0.2s;
}

.restart-btn:hover {
    background: #45B7AF;
    transform: translateY(-1px);
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-size: 8px;
    text-align: center;
    z-index: 10;
}

.neko {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #FFB347;
    border: 2px solid #333;
    border-radius: 50% 50% 40% 40%;
    transition: transform 0.1s;
    z-index: 5;
}

.neko::before {
    content: '😸';
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 24px;
}

.neko.jumping {
    transform: rotate(10deg);
}

.neko.left {
    transform: scaleX(-1);
}

.neko.left.jumping {
    transform: scaleX(-1) rotate(-10deg);
}

.platform {
    position: absolute;
    background: #8B4513;
    border: 2px solid #654321;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.cloud::before {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.start-screen h1 {
    color: #FF6B6B;
    margin-bottom: 30px;
    font-size: 24px;
    text-shadow: 2px 2px 0px #333;
}

.start-btn {
    background: #4ECDC4;
    color: white;
    border: 3px solid #333;
    padding: 15px 30px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    margin: 10px;
}

.start-btn:hover {
    background: #45B7AF;
    transform: translateY(-2px);
}

.mobile-controls {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.jump-btn {
    background: #4ECDC4;
    color: white;
    border: 3px solid #333;
    padding: 15px 40px;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.jump-btn:active {
    background: #45B7AF;
    transform: scale(0.95);
}

@media screen and (max-width: 768px) {
    body {
        padding: 50px 5px 5px 5px;
    }

    .game-container {
        border-width: 2px;
    }

    .ui, .high-score {
        font-size: 10px;
        top: 10px;
    }

    .ui {
        left: 10px;
    }

    .high-score {
        right: 10px;
    }

    .instructions {
        display: none;
    }

    .game-over {
        padding: 20px;
        width: 90%;
        max-width: 300px;
    }

    .game-over h2 {
        font-size: 14px;
    }

    .game-over p {
        font-size: 8px;
    }

    .restart-btn, .start-btn {
        padding: 8px 16px;
        font-size: 8px;
    }

    .start-screen h1 {
        font-size: 18px;
        text-align: center;
        padding: 0 10px;
    }

    .neko {
        width: 24px;
        height: 24px;
    }

    .neko::before {
        font-size: 18px;
    }

    .mobile-controls {
        display: block;
    }

    .jump-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .ui, .high-score {
        font-size: 8px;
    }

    .instructions {
        font-size: 5px;
    }

    .game-over h2 {
        font-size: 12px;
    }

    .game-over p {
        font-size: 7px;
    }

    .restart-btn, .start-btn {
        padding: 6px 12px;
        font-size: 7px;
    }

    .start-screen h1 {
        font-size: 16px;
    }

    .jump-btn {
        padding: 10px 25px;
        font-size: 12px;
    }
} 