@charset "UTF-8";
/* =========================================================
   ランクマッチ 対戦選択画面（battle_select.php）専用スタイル
   ========================================================= */

body { background-color: #1e1b4b; } 

.btn-back { background: #334155; color: #f8fafc; border: 2px solid #475569; padding: 8px 15px; border-radius: 6px; text-decoration: none; font-size: 0.9rem; font-weight: bold; transition: 0.2s; display: inline-block; }
.btn-back:hover { background: #475569; border-color: #64748b; }

.battle-box { background: #09090b; border: 3px solid #7e22ce; border-radius: 16px; padding: 35px 25px; position: relative; margin-top: 30px; box-shadow: 0 10px 40px rgba(126, 34, 206, 0.3); color: #f8fafc; }
.battle-box { 
    background: #09090b; 
    border: 3px solid #7e22ce; 
    border-radius: 16px; 
    padding: 35px 25px; 
    position: relative; 
    margin-top: 30px; 
    box-shadow: 0 10px 40px rgba(126, 34, 206, 0.3); 
    color: #f8fafc; 
    width: 100%;   /* 広告で幅が圧縮防止（100%固定） */
    box-sizing: border-box; 
    display: block; 
}
.battle-tag { position: absolute; top: -18px; left: -15px; background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; font-weight: bold; padding: 8px 25px; border-radius: 20px; box-shadow: 0 4px 10px rgba(126, 34, 206, 0.4); font-size: 1.1rem; letter-spacing: 2px; }

.b-status-card { background: #0f172a; border-radius: 12px; padding: 20px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; margin-bottom: 30px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05); }
.b-class-area { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 15px; text-align: center; min-width: 100px; flex-shrink: 0; }
.b-class-lbl { font-size: 0.75rem; color: #94a3b8; margin-bottom: 5px; font-weight: bold;}
.b-class-val { display: inline-flex; justify-content: center; align-items: center; padding: 5px 15px; min-width: 50px; height: 35px; font-family: "Times New Roman", Times, serif; font-weight: 900; font-size: 1.5rem; border-radius: 4px; box-shadow: 1px 2px 5px rgba(0,0,0,0.5); text-shadow: 1px 1px 2px rgba(0,0,0,0.8); letter-spacing: 1px; color: #fff; }
.badge-X { background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%); border: 2px solid #111827; }
.badge-S { background: linear-gradient(180deg, #9333ea 0%, #6b21a8 100%); border: 2px solid #d97706; }
.badge-A { background: linear-gradient(180deg, #e11d48 0%, #be123c 100%); border: 2px solid #f9a8d4; }
.badge-B { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); border: 2px solid #93c5fd; }
.badge-C { background: linear-gradient(180deg, #16a34a 0%, #15803d 100%); border: 2px solid #f59e0b; }

.b-user-area { flex-grow: 1; min-width: 0; }
.b-user-name { font-size: 1.2rem; font-weight: bold; margin-bottom: 5px; display: flex; align-items: center; gap: 10px; }
.b-user-icon { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: #fff; border: 2px solid #a855f7; }

.total-stats-text { font-size: 0.8rem; color: #94a3b8; border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 12px; margin-bottom: 15px; }

.stats-header-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; width: 100%; }
.btn-battle-record { display: inline-flex; align-items: center; justify-content: center; margin: 0 0 0 auto; padding: 0 14px; height: 26px; background: #a855f7; color: #fff; font-size: 0.85rem; font-weight: bold; border-radius: 20px; text-decoration: none; box-shadow: 0 2px 4px rgba(168, 85, 247, 0.4); transition: all 0.2s ease; line-height: 1; box-sizing: border-box; }
.btn-battle-record:hover { background: #9333ea; color: #fff; }
.btn-battle-record:active { transform: translateY(2px); box-shadow: 0 1px 2px rgba(168, 85, 247, 0.4); }

.b-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px;}
.b-stat-box { background: rgba(0,0,0,0.4); padding: 8px; border-radius: 8px; text-align: center; border: 1px solid rgba(255,255,255,0.02);}
.b-stat-lbl { font-size: 0.75rem; color: #94a3b8; margin-bottom: 3px; font-weight: bold;}
.b-stat-val { font-size: 1.2rem; font-weight: bold; font-family: 'Meiryo', 'メイリオ', sans-serif; }
.c-win { color: #4ade80; text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);}
.c-lose { color: #f87171; text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);}
.c-draw { color: #f8fafc; }
.c-rate { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.3);}

.b-dash-wrapper { margin-bottom: 25px; }
.b-dash-title { font-size: 1.0rem; font-weight: bold; color: #facc15; margin-bottom: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.b-stats-row-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; text-align: center; }
.b-dash-box { background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 8px; padding: 10px 5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); }

.mission-box { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 15px; }
.mission-title { font-size: 1.05rem; color: #d8b4fe; margin-top: 0; margin-bottom: 15px; border-bottom: 1px dashed rgba(216, 180, 254, 0.3); padding-bottom: 8px; display: flex; align-items: center; gap: 5px;}
.m-row { margin-bottom: 15px; }
.m-row:last-child { margin-bottom: 0; }
.m-header { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: bold; margin-bottom: 5px; align-items: flex-end;}
.m-lbl.up { color: #4ade80; }
.m-lbl.down { color: #f87171; }
.m-status { color: #f8fafc; font-size: 1.1rem; font-family: 'Meiryo', 'メイリオ', sans-serif; }
.m-bar-wrap { width: 100%; height: 8px; background: rgba(0,0,0,0.5); border-radius: 4px; overflow: hidden; margin-bottom: 5px;}
.m-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease-out; }
.m-bar-fill.up { background: linear-gradient(90deg, #10b981, #34d399); }
.m-bar-fill.down { background: linear-gradient(90deg, #b91c1c, #f87171); }
.m-desc { font-size: 0.75rem; color: #94a3b8; line-height: 1.4; }

.m-row.special-cond { padding: 12px 15px; border-radius: 8px; margin-top: 15px; }
.m-row.special-cond.up { background: rgba(250, 204, 21, 0.05); border: 1px solid rgba(250, 204, 21, 0.2); }
.m-row.special-cond.down { background: rgba(248, 113, 113, 0.05); border: 1px solid rgba(248, 113, 113, 0.2); }
.m-row.special-cond .m-header { font-size: 0.85rem; margin-bottom: 6px; }
.m-row.special-cond .m-status { font-size: 1rem; }
.m-row.special-cond .m-bar-wrap { height: 5px; margin-bottom: 6px; }
.m-row.special-cond .m-bar-fill.special-up { background: linear-gradient(90deg, #facc15, #eab308); }
.m-row.special-cond .m-bar-fill.special-down { background: linear-gradient(90deg, #f87171, #dc2626); }
.m-row.special-cond .m-desc { font-size: 0.75rem; }

.select-guide { text-align: center; font-size: 1.15rem; font-weight: bold; color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.6); margin-bottom: 15px; margin-top: 10px; animation: pulseText 2s infinite; }
@keyframes pulseText { 0% { opacity: 0.8; transform: scale(0.98); } 50% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 15px rgba(250, 204, 21, 0.9); } 100% { opacity: 0.8; transform: scale(0.98); } }

.b-cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 40px; }
.b-cat-btn { background: #1e293b; border: 2px solid #334155; border-radius: 8px; padding: 10px 8px; color: #cbd5e1; font-weight: bold; cursor: pointer; transition: 0.2s; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; font-size: 0.85rem; user-select: none; text-align: center; }
.b-cat-btn:hover { background: #334155; border-color: #64748b; }
.b-cat-btn.selected { background: #7e22ce; border-color: #c084fc; color: #fff; box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); transform: translateY(-2px); }
.b-cat-icon { font-size: 1.2rem; }

@media (max-width: 800px) { .b-cat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }

.ninja-rule-area { display: flex; align-items: center; gap: 20px; margin-bottom: 35px; }

.ninja-img-box { flex-shrink: 0; text-align: center; width: 80px; }
.ninja-img-box img { width: 80px; height: auto; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2)); }

.b-rule-box { flex-grow: 1; background: #1e293b; border: 2px dashed #9333ea; border-radius: 12px; padding: 20px; text-align: left; color: #cbd5e1; font-size: 0.9rem; line-height: 1.6; position: relative; }
.b-rule-box::before { content: ""; position: absolute; top: 50%; left: -14px; transform: translateY(-50%); border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-right: 14px solid #9333ea; }
.b-rule-box::after { content: absolute; top: 50%; left: -10px; transform: translateY(-50%); border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right: 12px solid #1e293b; }
.b-rule-title { font-weight: bold; color: #d8b4fe; font-size: 1.1rem; margin-bottom: 8px; }

.btn-guide-link { display: inline-block; background: rgba(255, 255, 255, 0.05); color: #d8b4fe; border: 1px dashed #c084fc; padding: 6px 15px; border-radius: 20px; font-size: 0.8rem; text-decoration: none; transition: 0.2s; margin-top: 12px; }
.btn-guide-link:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.b-start-area { text-align: center; }
.b-start-btn { background: linear-gradient(135deg, #a855f7, #7e22ce); color: #fff; border: none; padding: 15px 60px; border-radius: 40px; font-size: 1.3rem; font-weight: bold; cursor: pointer; box-shadow: 0 6px 20px rgba(147, 51, 234, 0.5); transition: 0.2s; display: inline-block; text-decoration: none; }
.b-start-btn:hover:not(.disabled) { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 25px rgba(147, 51, 234, 0.7); filter: brightness(1.1); }
.b-start-btn.disabled { background: #334155; color: #64748b; box-shadow: none; cursor: not-allowed; }

/* ▼ 修正：フッターへの余白のみ残し、表示は style.css の薄い青に任せます ▼ */
#footer { margin-top: 50px; }

@media (max-width: 600px) {
    .battle-tag { left: -3px; top: -15px; font-size: 1rem; padding: 6px 18px; }
    .ninja-rule-area { flex-direction: column-reverse; gap: 15px; }
    .b-rule-box::before { top: auto; bottom: -14px; left: 50%; transform: translateX(-50%); border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: none; border-top: 14px solid #9333ea; }
    .b-rule-box::after { top: auto; bottom: -10px; left: 50%; transform: translateX(-50%); border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: none; border-top: 12px solid #1e293b; }
    .b-user-name { font-size: 1.1rem; gap: 6px; }
    .b-user-icon { width: 24px; height: 24px; }
    .b-class-val { font-size: 1.3rem; min-width: 45px; padding: 3px 10px; }
    .b-stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .b-stats-row-5 { grid-template-columns: repeat(3, 1fr); }
    .b-dash-box:nth-child(4), .b-dash-box:nth-child(5) { grid-column: span 1; }
    
    .m-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .m-status { align-self: flex-end; font-size: 1.2rem; }
    .select-guide { font-size: 1rem; }
}

/* ▼ 翻訳用モーダルのスタイル ▼ */
.translate-guide-btn {
    background: rgba(30, 41, 59, 0.8); border: 1px solid #a855f7; color: #e2e8f0;
    font-size: 12px; font-weight: bold; padding: 6px 14px; border-radius: 14px;
    cursor: pointer; transition: all 0.2s ease;
    display: inline-flex; align-items: center; line-height: 1.2; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
}
.translate-guide-btn:hover { background: #a855f7; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(168, 85, 247, 0.4); }

.translate-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    padding: 20px; box-sizing: border-box;
}
.translate-modal-overlay.is-show { opacity: 1; visibility: visible; }

.translate-modal-content {
    background: #1e293b; width: 100%; max-width: 420px; border-radius: 16px;
    padding: 25px 20px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid #475569;
    transform: translateY(20px); transition: transform 0.3s ease; text-align: left;
    color: #f8fafc;
}
.translate-modal-overlay.is-show .translate-modal-content { transform: translateY(0); }

.translate-modal-close {
    position: absolute; top: 15px; right: 15px; width: 30px; height: 30px;
    background: #334155; border: none; border-radius: 50%; font-size: 20px;
    color: #94a3b8; cursor: pointer; display: flex; justify-content: center; align-items: center;
    transition: all 0.2s;
}
.translate-modal-close:hover { background: #475569; color: #f8fafc; }

.translate-modal-title { font-size: 1.15rem; font-weight: 900; color: #f8fafc; margin: 0 0 12px 0; border-bottom: 2px solid #334155; padding-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.translate-modal-desc { font-size: 0.9rem; color: #cbd5e1; margin-bottom: 15px; line-height: 1.6; }

.translate-modal-instructions { background: #0f172a; border: 1px solid #334155; border-radius: 8px; padding: 15px; font-size: 0.85rem; color: #e2e8f0; line-height: 1.6; margin-bottom: 15px; }
.translate-modal-instructions strong { color: #f8fafc; font-size: 0.9rem; display: block; margin-bottom: 4px; }
.translate-modal-instructions .inst-block { margin-bottom: 12px; }
.translate-modal-instructions .inst-block:last-child { margin-bottom: 0; }

.translate-modal-note { font-size: 0.75rem; color: #fca5a5; font-weight: bold; margin: 0; line-height: 1.4; padding: 8px; background: rgba(216, 27, 96, 0.1); border: 1px solid rgba(216, 27, 96, 0.3); border-radius: 6px; }

/* =========================================================
   ゲスト案内用・SEOコンテンツ用スタイル
   ========================================================= */
.guest-teaser-box {
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    background-color: #f8fafc;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.guest-teaser-title {
    color: #334155;
    font-weight: 900;
    font-size: 1.15rem;
    margin-bottom: 12px;
}
.guest-teaser-desc {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.guest-seo-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}
.guest-seo-content h4 {
    color: #1e293b;
    font-size: 1.05rem;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}
.guest-seo-content p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}
.guest-seo-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
.guest-seo-content li {
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
    color: #334155;
    line-height: 1.4;
}
.guest-seo-content li::before {
    content: "■";
    position: absolute;
    left: 4px;
    top: 0;
    font-size: 0.8rem;
}

.guest-teaser-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}
.btn-gt-login, .btn-gt-reg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 30px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.95rem;
}
.btn-gt-login {
    background-color: #e46d6d;
    color: white;
    border: 2px solid #e46d6d;
    box-shadow: 0 2px 4px rgba(228, 109, 109, 0.2);
}
.btn-gt-login:hover { background-color: #d15858; border-color: #d15858; color: white; transform: translateY(-1px); }
.btn-gt-reg {
    background-color: white;
    color: #e46d6d;
    border: 2px solid #e46d6d;
}
.btn-gt-reg:hover { background-color: #fff0f0; color: #d15858; border-color: #d15858; transform: translateY(-1px); }

@media screen and (max-width: 600px) {
    .guest-seo-content { padding: 15px; }
    .guest-seo-content li { font-size: 0.85rem; }
}

/* =========================================================
   共通バナーエリア（クイズ・マルバツ・勉強ルーム）強制統一版
   ========================================================= */
.study-banner-area {
    display: flex;
    flex-direction: column;
    gap: 24px !important; 
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    width: 100%;
}

/* 3つのバナーの外枠と余白を完全に強制統一 */
.study-banner-area > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    margin: 0 !important;
    min-height: 85px !important; /* 高さを確実に揃える */
}

/* 中のテキスト部分の余白を強制リセット */
.quiz-banner-text, .ox-banner-text, .study-banner-text {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 5px !important;
    flex-grow: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* タイトルの余白を強制リセット */
.quiz-banner-title, .ox-banner-title, .study-banner-title {
    font-size: 1.2rem !important;
    font-weight: bold !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    padding: 0 !important;
}

/* 説明文の余白を強制リセット */
.quiz-banner-desc, .ox-banner-desc, .study-banner-desc {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ボタンの余白とサイズを強制リセット */
.quiz-banner-btn, .ox-banner-btn, .study-banner-btn {
    font-weight: bold !important;
    font-size: 0.95rem !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    height: auto !important;
}

/* ▼ クイズ・検定・早押しバナー（青色） ▼ */
.quiz-banner { 
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important; 
    border: 2px solid transparent !important; /* 高さを揃える透明枠 */
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3) !important; 
}
.quiz-banner-title { color: #fff !important; text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important; }
.quiz-banner-desc { color: #fff !important; opacity: 0.9 !important; }
.quiz-banner-btn { background: #fff !important; color: #1d4ed8 !important; box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important; transition: 0.2s; }
.quiz-banner:hover { transform: translateY(-3px) !important; box-shadow: 0 8px 20px rgba(29, 78, 216, 0.5) !important; background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important; }
.quiz-banner:hover .quiz-banner-btn { background: #f0f5ff !important; transform: scale(1.05) !important; }

/* ▼ マルバツクイズバナー（緑色） ▼ */
.ox-banner {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border: 2px solid #86efac !important; 
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.1) !important;
}
.ox-banner-title { color: #15803d !important; font-weight: 900 !important; }
.ox-banner-desc { color: #166534 !important; }
.ox-banner-btn { background: #22c55e !important; color: #fff !important; box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important; transition: 0.2s; }
.ox-banner:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 12px rgba(34, 197, 94, 0.2) !important; border-color: #22c55e !important; background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important; }
.ox-banner:hover .ox-banner-btn { background: #16a34a !important; transform: scale(1.05) !important; }

/* ▼ 勉強ルームバナー（赤色） ※念のため定義 ▼ */
.study-banner {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border: 2px solid #fca5a5 !important;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.1) !important;
}
.study-banner-title { color: #b91c1c !important; font-weight: 900 !important; }
.study-banner-desc { color: #991b1b !important; }
.study-banner-btn { background: #ef4444 !important; color: #fff !important; box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important; transition: 0.2s; }
.study-banner:hover { transform: translateY(-3px) !important; box-shadow: 0 6px 12px rgba(239, 68, 68, 0.2) !important; border-color: #ef4444 !important; background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important; }
.study-banner:hover .study-banner-btn { background: #dc2626 !important; transform: scale(1.05) !important; }

/* ▼ スマホ用レスポンシブ調整（バナー共通） ▼ */
@media screen and (max-width: 767px) {
    .study-banner-area > a { 
        flex-direction: column !important; 
        text-align: center !important; 
        gap: 15px !important; 
        padding: 20px 15px !important; 
    }
    .quiz-banner-btn, .ox-banner-btn, .study-banner-btn { width: 100% !important; box-sizing: border-box !important; }
}