/* 必須: iframe内での正しい表示のため */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Noto Sans JP', sans-serif;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* UI表示 */
#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.score-display, .time-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
}

/* リザルト画面 */
#result-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

#result-screen.hidden {
    display: none;
}

.result-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
}

#result-title {
    font-size: 36px;
    margin: 0 0 20px 0;
    color: #333;
}

#result-message {
    font-size: 18px;
    color: #666;
    margin: 0 0 30px 0;
}

#restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

#restart-btn:hover {
    transform: scale(1.05);
}

#restart-btn:active {
    transform: scale(0.95);
}

/* クリックエフェクト */
.click-effect {
    position: absolute;
    color: white;
    font-size: 32px;
    font-weight: bold;
    pointer-events: none;
    animation: clickAnimation 1s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@keyframes clickAnimation {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(2) translateY(-50px);
        opacity: 0;
    }
}
