:root {
    --bg-deep: #020b18;
    --accent: #64ffda;
    --gold: #fbbf24;
    --danger: #ff4d4d;
    --text-muted: #8892b0;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/zen_fishing_bg.png') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Noto Sans JP', sans-serif;
    user-select: none;
    margin-top: -80px; /* Offset Layout navbar */
    padding-top: 80px;
}

.overlay-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(2, 11, 24, 0.6) 100%);
    pointer-events: none;
    z-index: 2;
    transition: background 2s ease;
}

/* Bobber */
#bobber-container {
    position: absolute;
    width: 60px;
    height: 120px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.bobber {
    width: 18px;
    height: 52px;
    background: linear-gradient(to bottom, #ff3e3e 40%, #ffffff 40%);
    border-radius: 9px;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}
.casting {
    display: flex !important;
    animation: cast-arc 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.waiting {
    display: flex !important;
    animation: pukapuka 3.5s infinite ease-in-out;
}
.bite {
    display: none !important;
}

@keyframes cast-arc {
    0% { transform: translate(0, 500px) scale(0.5) rotate(-30deg); opacity: 0; }
    50% { transform: translate(0, -150px) scale(1.2) rotate(15deg); opacity: 1; }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pukapuka {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(10px) rotate(1deg); }
}

/* Tension Gauge */
#tension-ui {
    position: absolute;
    bottom: 150px;
    width: 300px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border: 2px solid var(--accent);
    border-radius: 20px;
    overflow: hidden;
    display: none;
    z-index: 80;
    backdrop-filter: blur(5px);
}
.tension-target {
    position: absolute;
    height: 100%;
    background: rgba(100, 255, 218, 0.4);
    border-left: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    left: 50%;
    transform: translateX(-50%);
}
.tension-cursor {
    position: absolute;
    height: 100%;
    width: 6px;
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
    left: 0;
    transition: left 0.05s linear;
}

/* Catch Display */
#catch-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}
.fish-hero {
    width: 300px;
    height: 300px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 40px var(--accent));
}
.light-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: -1;
}
.show-catch {
    display: flex !important;
    animation: catch-impact 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes catch-impact {
    0% { transform: translate(-50%, 100%) scale(0); opacity: 0; }
    60% { transform: translate(-50%, -60%) scale(1.4); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.burst-anim {
    animation: burst-expand 1.2s forwards;
}
@keyframes burst-expand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* HUD */
.hud {
    position: absolute;
    top: 40px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    pointer-events: none;
    z-index: 30;
}
.stat-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--accent);
}
.stat-value {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.5rem;
}

/* Glints */
.glint {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 50;
    cursor: pointer;
    pointer-events: auto;
    animation: glint-pulsing 3s ease-in-out forwards;
}
@keyframes glint-pulsing {
    0% { transform: scale(0); opacity: 0; }
    20% { transform: scale(1.3); opacity: 0.9; }
    80% { transform: scale(1.0); opacity: 0.7; }
    100% { transform: scale(0.5); opacity: 0; }
}
.glint-hit {
    position: absolute;
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 51;
    animation: float-up 0.8s forwards;
}
@keyframes float-up {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-40px); opacity: 0; }
}

/* Instructions */
.big-instruction {
    position: absolute;
    top: 30%;
    width: 100%;
    text-align: center;
    font-family: 'Noto Serif JP', serif;
    font-size: 2.2rem;
    color: var(--gold);
    letter-spacing: 5px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    text-shadow: 0 0 30px rgba(0,0,0,0.9);
    z-index: 70;
    font-weight: 900;
}
.visible {
    opacity: 1 !important;
}

#interaction-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
}
.shake {
    animation: screen-shake 0.5s ease-out;
}
.bite-shake {
    animation: screen-shake 0.2s infinite;
}
@keyframes screen-shake {
    0%, 100% { transform: translate(0, 0); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-12px, 12px); }
    20%, 40%, 60%, 80% { transform: translate(12px, -12px); }
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(2, 11, 24, 0.98);
    backdrop-filter: blur(30px);
    z-index: 100;
    padding: 40px;
    text-align: center;
}
.mood-btn {
    padding: 15px 30px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}
.mood-btn.active {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
    font-weight: bold;
}
.exit-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
}
.exit-btn:hover {
    background: var(--accent);
    color: var(--bg-deep);
}

.btn-start {
    margin-top: 20px;
    padding: 18px 70px;
    background: var(--accent);
    color: var(--bg-deep);
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    letter-spacing: 5px;
}
.btn-start:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media screen and (max-width: 480px) {
    /* 気分選択ボタン: 横3個を折り返して2+1に */
    .screen {
        padding: 30px 20px;
    }
    .mood-btn {
        padding: 12px 18px;
        font-size: 0.85rem;
        letter-spacing: 1px;
        flex: 1 1 120px;
    }
    /* 「ターゲットを狙え！」の画面内大テキスト */
    .big-instruction {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    /* 調律を開始するボタン */
    .btn-start {
        padding: 15px 40px;
        letter-spacing: 3px;
        font-size: 0.9rem;
    }
}
