body {
    margin: 0;
    padding: 0;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    overflow: hidden;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

/* 共通画面スタイル */
#start-screen,
#result-screen {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    z-index: 10;
}

.hidden {
    display: none !important;
}

/* スタート画面 */
#start-screen h1 {
    font-size: 48px;
    margin: 0 0 20px 0;
}

#start-screen p {
    font-size: 20px;
    margin-bottom: 20px;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.instructions p {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.instructions ul {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 5px 0;
    font-size: 16px;
}

/* ボタン */
.primary-btn {
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.primary-btn:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* ゲーム画面 */
#game-screen {
    width: 100%;
    height: 100%;
    position: relative;
}

/* NEXTボックス */
#next-box {
    position: absolute;
    left: 20px;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 10px;
    z-index: 10;
    text-align: center;
}

.next-label {
    color: #FFD700;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

#nextCanvas {
    display: block;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(to bottom, #87ceeb 0%, #fff 100%);
    cursor: crosshair;
}

/* UI統計 */
#ui-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

#ui-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.stats {
    display: flex;
    gap: 30px;
    font-size: 16px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 20px;
    border-radius: 10px;
}

.highlight {
    color: #ffd700;
    font-size: 22px;
}

.timer {
    font-weight: bold;
    transition: color 0.3s;
}


/* 結果画面 */
#result-screen h2 {
    font-size: 36px;
    margin-bottom: 30px;
}

.result-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.result-stats p {
    font-size: 24px;
    margin: 15px 0;
}

/* スコアポップアップアニメーション */
@keyframes scorePopup {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/* レスポンシブ対応 */
@media (max-width: 800px) {
    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .stats {
        flex-direction: column;
        gap: 5px;
        font-size: 14px;
    }

    .highlight {
        font-size: 18px;
    }
}
