/* ==========================================================================
   pause.css - iPhone SE / 縦短画面 完全対応版
   ========================================================================== */

.pause-trigger {
    position: absolute; /* fixedからabsoluteに変更 */
    top: 50px;          /* スコアバー（高さ約40〜45px）のすぐ下に配置 */
    left: 10px;         /* ★一番左上に配置 */
    right: auto;        /* 右側固定を解除 */
    
    /* 他の要素に隠されないように最前面へ */
    z-index: 9990; 
    
    /* 見た目の装飾 */
    background: rgba(15, 23, 42, 0.85);
    color: #00ffcc;
    border: 2px solid #00ffcc;
    border-radius: 6px; /* スコアボードと馴染むように少し角丸に */
    padding: 4px 10px;
    font-size: 12px;     /* スコアの下なので少し小ぶりに */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ★ 念のため：ポーズ画面用の黒背景レイヤー（親要素）の設定 
   リザルト画面の .overlay と共通なら不要ですが、個別にある場合はこれを適用してください */
.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    
    /* ★ 修正：中央寄せにして、はみ出た場合はスクロールを許可 */
    justify-content: center;
    align-items: center; 
    z-index: 9995; /* リザルトの100000の一歩手前、ゲーム中よりは前面 */
    box-sizing: border-box;
    padding: 10px;
}
.pause-overlay.show {
    display: flex;
}

/* --- ポーズ画面の枠組み（重なり解消リファクタリング） --- */
.pause-box {
    background: #0f172a; /* 少し青みのあるダーク */
    border: 3px solid #00ffcc; /* 再開をイメージさせる青緑 */
    border-radius: 12px;
    padding: 25px;
    width: 92%; /* SE向けに幅を少し広げてパディングを確保 */
    max-width: 320px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.3);
    
    /* ★ 修正：一律で absolute や bottom: 260px; を完全廃止！
       親のFlexboxによって、画面内の最も安全な「ど真ん中」に自動配置されます */
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;

    /* ★ 修正：縦の短い画面でも絶対に見切れないようにする上限ガード */
    max-height: 75vh;
    overflow-y: auto;
    height: auto !important;
}

.pause-title {
    font-size: 28px; /* SE向けに32pxから少しだけコンパクトに調整 */
    margin: 0 0 15px 0;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    letter-spacing: 4px;
}

/* ポーズ中のステータス表示 */
.pause-status {
    background: rgba(0, 255, 204, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
.pause-status p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #ccc;
}
.status-icon {
    font-size: 24px;
    color: #00ffcc;
    animation: rotate-slow 3s infinite linear;
}
@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 再開ボタン（リトライボタンと同系統のスタイル） */
.resume-button {
    background: #00ffcc;
    color: #0f172a;
    border: none;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
    transition: transform 0.1s;
    
    /* フロー内に正しく配置 */
    position: relative;
}
.resume-button:active {
    transform: scale(0.96);
}
