@charset "UTF-8";

body { margin: 0; overflow: hidden; background-color: #2e7d32; font-family: 'Noto Sans JP', sans-serif; user-select: none; }

/* シンプルな芝生 (線なし) */
.field-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(to bottom, #1b5e20 0%, #4caf50 100%);
    perspective: 800px; overflow: hidden; z-index: 0;
}
.grass-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* うっすらとした芝目のみ */
    background-image: repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.02) 40px, rgba(255,255,255,0.02) 80px);
    transform-origin: bottom;
    transform: rotateX(20deg) scale(1.5);
}

/* ゴール */
.goal-area {
    position: absolute; top: 15%; left: 50%; transform: translateX(-50%);
    width: 320px; height: 140px; z-index: 1;
}
.goal-post {
    width: 100%; height: 100%; 
    border: 8px solid #f0f0f0; border-bottom: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4); 
    position: relative;
    background: rgba(255,255,255,0.05);
}
.net {
    width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 15px 15px;
}

#game-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 5;
    touch-action: none;
}

#effect-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20;
}

/* UI系 */
.ui-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

.header-bar {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    padding: 10px 20px; box-sizing: border-box;
    display: flex; align-items: center; gap: 20px;
    z-index: 100; pointer-events: auto;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
.btn-menu {
    background: rgba(255,255,255,0.9); border: none; border-radius: 30px;
    padding: 8px 16px; color: #1b5e20; font-weight: bold; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    backdrop-filter: blur(5px);
}
.header-title { color: #fff; font-weight: 900; font-size: 1.2rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.score-board, .time-board {
    position: absolute; top: 80px; 
    background: rgba(0,0,0,0.5); padding: 5px 20px; border-radius: 15px; text-align: center;
    border: 2px solid rgba(255,255,255,0.8); color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); backdrop-filter: blur(4px);
}
.score-board { right: 20px; }
.time-board { left: 20px; }
.label { font-size: 0.7rem; font-weight: bold; color: #eee; letter-spacing: 1px; }
.val { font-size: 2rem; font-weight: 900; font-family: 'Orbitron'; line-height: 1; }

.goal-text {
    position: absolute; font-family: 'Noto Sans JP'; font-weight: 900;
    color: #ffeb3b; font-size: 4rem; 
    text-shadow: 3px 3px 0 #b71c1c, -2px -2px 0 #b71c1c;
    animation: popUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: none; white-space: nowrap; z-index: 100;
}
@keyframes popUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(1.0); opacity: 0; }
}

.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); display: flex; flex-direction: column;
    justify-content: center; align-items: center; pointer-events: auto;
}
.hidden { display: none !important; }

.setup-card {
    background: white; padding: 25px; border-radius: 20px; width: 90%; max-width: 550px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); text-align: center;
}
.card-title { font-size: 2rem; color: #1b5e20; margin-bottom: 10px; font-weight: 900; }
.card-desc { 
    text-align: left; color: #555; margin-bottom: 20px; line-height: 1.6; 
    background: #e8f5e9; padding: 15px; border-radius: 10px; font-size: 0.95rem;
}
.settings-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px;
}
.s-item { display: flex; flex-direction: column; gap: 5px; text-align: left;}
.s-item label { font-weight: bold; color: #1b5e20; font-size: 0.9rem; }
select { padding: 10px; border-radius: 8px; border: 1px solid #ccc; font-size: 1rem; width: 100%; box-sizing: border-box; background: #f9f9f9; }

.start-btn {
    background: #ff5722; color: white; border: none; padding: 15px 0; border-radius: 50px;
    font-size: 1.4rem; font-weight: bold; cursor: pointer; width: 100%; display: block;
    box-shadow: 0 4px 0 #bf360c; margin-bottom: 15px; transition: transform 0.1s;
}
.start-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #bf360c; }
.btn-sub { background: transparent; border: 2px solid #aaa; color: #777; padding: 10px; border-radius: 50px; cursor: pointer; width: 100%; }
.result-stats { margin: 30px 0; }
.res-val { color: #ff5722; font-size: 4rem; font-weight: 900; font-family: 'Orbitron'; line-height: 1;}