@charset "utf-8";

/* =========================================================
   マルバツクイズ 検索ポータル・カード専用スタイル
   (quiz_ox_card.php 専用ファイル)
========================================================= */

/* ▼ ベース背景設定（季節テーマより強い権限で強制上書き） ▼ */
html, 
body,
body[class*="theme-"] {
    background-color: #e0f2f1 !important;
    background-image: none !important;
}

#wrapper {
    background-color: transparent !important;
    background-image: none !important;
}

/* ▼ システムエラーメッセージ ▼ */
.system-error-msg {
    padding: 20px;
    text-align: center;
    color: #e11d48;
    font-weight: bold;
    background: #ffe4e6;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fecdd3;
}

/* ▼ 検索パネルのフレーム装飾 ▼ */
.ox-search-panel {
    background: #ffffff !important;
    border: 3px dashed #a5d6a7 !important;
    border-radius: 16px !important;
    padding: 30px 20px 25px !important;
    margin-top: 40px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03) !important;
    position: relative;
}
.ox-search-panel::before {
    content: "🔍 クイズを探す";
    position: absolute;
    top: -16px; left: 20px;
    background: #10b981; color: #ffffff;
    padding: 6px 18px; border-radius: 20px;
    font-size: 14px; font-weight: bold;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    letter-spacing: 1px;
}

/* =========================================
   検索バー周りの高さ統一とレイアウト（サイズダウン＆スマホ横並び対応）
========================================= */
.search-bar-flex {
    display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: space-between; align-items: center; margin-bottom: 25px;
}
.ox-search-input, .search-select, .ox-btn-search {
    height: 42px !important; /* 50pxから1段階サイズダウン */
    box-sizing: border-box !important;
    font-size: 14px !important; /* 15pxから1段階サイズダウン */
    border-radius: 50px !important;
    outline: none; transition: all 0.2s ease;
}

/* キーワード入力（スマホ時は1行目・横幅100%） */
.ox-search-input {
    width: 100%; flex: 0 0 100%;
    background: #f8fafc !important; color: #334155 !important;
    border: 2px solid #e2e8f0 !important;
    padding: 0 16px !important;
}
.ox-search-input:focus, .search-select:focus {
    border-color: #10b981 !important; background: #ffffff !important;
}
.ox-search-input::placeholder { color: #94a3b8 !important; font-weight: normal; }

/* カテゴリ（スマホ時は2行目の左側で残りの幅を占有） */
.search-select {
    flex: 1; 
    width: auto;
    background: #f8fafc !important; color: #334155 !important;
    border: 2px solid #e2e8f0 !important;
    padding: 0 12px !important;
    font-weight: bold !important;
}

/* 検索ボタン（スマホ時は2行目の右側で幅固定） */
.ox-btn-search {
    flex: 0 0 100px; /* 横幅を100pxに固定して横並びに */
    background: #f59e0b !important; border: none !important; box-shadow: none !important;
    color: #ffffff !important;
    padding: 0 !important;
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    font-weight: bold !important; cursor: pointer;
}
.ox-btn-search:hover {
    background: #fbbf24 !important; 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3) !important; 
}
.ox-btn-search:active {
    transform: translateY(1px);
    box-shadow: none !important;
}

/* PC・タブレット向けの調整（画面が広い場合は3つ全てを横1列に配置） */
@media (min-width: 600px) {
    .search-bar-flex { flex-wrap: nowrap; }
    .ox-search-input { flex: 1; width: auto; }
    .search-select { flex: 0 0 180px; width: 180px; }
    .ox-btn-search { flex: 0 0 100px; }
}

/* =========================================
   シンプルなラジオボタン（出題数を選んでね）
========================================= */
.limit-toggle-box {
    background: #cce3d0; border: none; border-radius: 12px;
    padding: 12px 20px; /* はみ出し防止のため左右の余白を適切に調整 */
    text-align: center; 
    width: 100%; /* 親要素に合わせる */
    max-width: 380px; /* 最大幅を指定（元の約1.5倍程度） */
    margin: 0 auto;
    box-sizing: border-box; /* コンテナからはみ出さないための必須設定 */
}
.limit-toggle-box .toggle-title {
    color: #2c5e3b; font-weight: 800; font-size: 0.85rem; margin-bottom: 12px; letter-spacing: 1px;
}
.limit-toggle-inner { 
    display: flex; justify-content: space-evenly; /* gapではなく均等配置で綺麗に並べる */ 
    align-items: center;
}
.limit-toggle-box label { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.limit-toggle-box input[type="radio"] { transform: scale(1.3); margin: 0; cursor: pointer; accent-color: #0066ff; }
.limit-toggle-box .radio-text { font-size: 1.2rem; font-weight: 900; color: #a3b8a8; transition: color 0.2s; }
.limit-toggle-box input[type="radio"]:checked + .radio-text { color: #4caf50; }

/* ▼ 検索結果メッセージ表示 ▼ */
.ox-search-result-count { margin-bottom: 15px; font-weight: bold; color: #334155; padding-left: 10px; font-size: 1.1rem; }
.ox-search-result-count span { font-size: 14px; opacity: 0.9; }

/* ▼ フォールバック用キャラクターメッセージ ▼ */
.fallback-penguin-wrapper {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin: 30px auto; max-width: 700px;
    background: transparent; border: none; box-shadow: none; padding: 10px;
}
.fallback-penguin-icon { 
    width: 85px; height: auto; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); 
}
.fallback-penguin-bubble {
    background: #ffffff; 
    border: 3px solid #f59e0b; 
    padding: 15px 25px;
    border-radius: 16px; 
    position: relative; font-size: 15px; color: #334155; line-height: 1.6;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}
.fallback-penguin-bubble::before {
    content: ""; position: absolute; top: 50%; right: -15px; margin-top: -10px;
    border: 11px solid transparent; border-left-color: #f59e0b;
}
.fallback-penguin-bubble::after {
    content: ""; position: absolute; top: 50%; right: -10px; margin-top: -8px;
    border: 9px solid transparent; border-left-color: #ffffff;
}

/* ▼ 検索結果タイトル表示 ▼ */
.ox-search-result-title {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px;
    margin: 30px 0 15px 0; padding: 0; font-weight: bold; color: #334155; font-size: 1.2rem;
}
.ox-search-result-title .highlight-num { color: #10b981; font-size: 1.5rem; font-weight: 900; margin: 0 2px; }
.ox-search-result-title span.sub-count { font-size: 0.95rem; color: #64748b; font-weight: normal; margin-left: 10px; }

/* ▼ おすすめ件数表示 ▼ */
.ox-search-recommend-count {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px;
    margin: 40px 0 20px; padding-bottom: 12px;
    font-weight: bold; color: #334155; font-size: 1.2rem;
    border-bottom: 3px solid #e2e8f0; 
    background: transparent; border-left: none; 
}
.ox-search-recommend-count .recommend-icon { font-size: 1.5rem; margin-right: 5px; }
.ox-search-recommend-count .highlight-num { color: #10b981; font-size: 1.5rem; font-weight: 900; margin: 0 2px; }
.ox-search-recommend-count span.sub-count { font-size: 0.95rem; color: #64748b; font-weight: normal; margin-left: 10px; }

/* ▼ カードグリッドレイアウト ▼ */
.ox-grid-container {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px; margin-bottom: 40px;
}
.ox-no-result {
    grid-column: 1 / -1; text-align: center; padding: 50px; color: #64748b;
    background: rgba(255,255,255,0.5); border-radius: 12px; border: 1px dashed #94a3b8;
}

/* ▼ クイズカード本体 ▼ */
.ox-card {
    background: #ffffff !important;
    border: 4px solid #416a82 !important; 
    border-radius: 16px !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
    color: #334155 !important;
    padding: 20px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex;
    flex-direction: column;
}

/* ホバー時のアクション（色と浮遊感） */
.ox-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.15) !important;
    background: #f0fdf4 !important;
    border-color: #10b981 !important;
}

.ox-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.ox-card-icon { width: 44px; height: 44px; border-radius: 10px; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.ox-card:hover .ox-card-icon { transform: scale(1.15) rotate(-5deg); }
.ox-card-title { color: #1e293b !important; font-weight: 900 !important; font-size: 1.15rem !important; margin: 0; line-height: 1.3; }

/* メタ情報群 */
.card-meta-info { 
    font-size: 13px; /* 11px から 13px へサイズアップ */
    margin-bottom: 15px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: #64748b !important; 
}
.meta-diff-badge { padding: 3px 8px; border-radius: 4px; font-weight: bold; font-size: 11px; }
.meta-stars { 
    font-size: 14px; /* 12px から 14px へサイズアップ */
    letter-spacing: 2px; 
}
.meta-stars-active { color: #f59e0b; }
.meta-stars-inactive { color: #cbd5e1; }
.meta-item-border { border-left: 1px solid #e2e8f0; padding-left: 10px; }

/* 数値部分のフォントを太くし、クッキリとした色合いに変更して存在感を強調 */
.meta-item-highlight { 
    color: #dc2626 !important; /* より識別しやすい鮮やかな赤（ローズレッド）へ変更 */
    font-size: 15px; 
    font-weight: 900; 
}
.meta-item-highlight-alt { 
    color: #d97706 !important; /* 視認性の高い深みのあるオレンジへ変更 */
    font-size: 15px; 
    font-weight: 900; 
}

.badge-nodata { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.badge-intro { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.badge-beginner { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.badge-intermediate { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.badge-advanced { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge-extreme { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }

/* スタッツ表示 */
.ox-stat-box {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 4px; display: flex;
    justify-content: space-around; gap: 10px; margin-bottom: 15px; transition: border-color 0.3s;
}
.ox-card:hover .ox-stat-box { border-color: #a7f3d0; }
.ox-stat-item { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.ox-stat-label { font-size: 11px; color: #64748b; margin-bottom: 4px; font-weight: bold; }
.ox-stat-value { font-size: 14px; font-weight: 900; color: #334155; }
.ox-stat-value.pink { color: #ec4899; }

/* プレビューテキスト表示領域 */
.preview-fade {
    background: transparent !important; color: #475569 !important; font-size: 12px; line-height: 1.6;
    max-height: 80px; overflow: hidden; text-align: left; position: relative; border-radius: 4px; padding: 5px;
}
.preview-fade-item { margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-fade-bottom {
    background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff) !important;
    position: absolute; bottom: 0; left: 0; width: 100%; height: 25px; transition: background 0.3s;
}
.ox-card:hover .preview-fade-bottom { background: linear-gradient(to bottom, rgba(240,253,244,0), #f0fdf4) !important; }

/* アクションボタン（開始） */
.ox-card-action { margin-top: auto; padding-top: 12px; text-align: center; position: relative; z-index: 10; }
.btn-direct-start {
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; height: 40px;
    background: #10b981 !important; box-shadow: 0 4px 0 #059669 !important; border: none !important;
    color: #ffffff !important; border-radius: 6px !important;
    font-weight: bold; transition: all 0.1s; text-decoration: none;
}
.btn-direct-start:active, .btn-direct-start:hover { transform: translateY(4px); box-shadow: none !important; text-decoration: none; background-color: #059669 !important; }

/* =========================================================
   ▼▼▼ マルバツクイズ プレイ中演出（コンボ・テンポアップ） ▼▼▼
========================================================= */
.combo-popup {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 3.5rem;
    font-weight: 900;
    color: #ff5722;
    text-shadow: 
        3px 3px 0 #fff, -3px -3px 0 #fff, 
        3px -3px 0 #fff, -3px 3px 0 #fff, 
        0 8px 15px rgba(255, 87, 34, 0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    font-family: 'Arial Black', 'Impact', sans-serif;
    font-style: italic;
}

.combo-popup.is-active {
    animation: popCombo 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popCombo {
    0% { opacity: 0; transform: translate(-50%, -10px) scale(0.5); }
    30% { opacity: 1; transform: translate(-50%, -40px) scale(1.2); }
    70% { opacity: 1; transform: translate(-50%, -40px) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -60px) scale(1.5); }
}

/* =========================================================
   ▼▼▼ プレイ画面・SNSシェアボタン関連の共通スタイル追記 ▼▼▼
========================================================= */
.mode-ox .quiz-ans li:nth-child(3),
.mode-ox .quiz-ans li:nth-child(4) { 
    display: none !important; 
}
.mode-ox .quiz-ans li:nth-child(1) .quiz-button { 
    border: 4px solid #f44336 !important; 
    border-radius: 16px !important; 
}
.mode-ox .quiz-ans li:nth-child(2) .quiz-button { 
    border: 4px solid #2196f3 !important; 
    border-radius: 16px !important; 
}

.sns-share-container { 
    text-align: center; 
    margin: 40px 0 10px 0; 
}
.sns-share-label { 
    font-weight: bold; 
    color: #555; 
    margin-bottom: 12px; 
    font-size: 0.95rem; 
}
.sns-share-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    flex-wrap: wrap; 
}
.sns-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    width: 135px;
    padding: 10px 0;
    color: #fff !important; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: bold; 
    font-size: 0.85rem;
    transition: all 0.2s; 
    border: none; 
    cursor: pointer; 
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.sns-btn:hover { opacity: 0.85; transform: translateY(-1px); color: #fff; }
.sns-x { background-color: #000000; }
.sns-line { background-color: #06C755; }
.sns-fb { background-color: #1877F2; }
.sns-copy { background-color: #64748b; }

#answer-check-frame .sns-share-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    clear: both !important;
}
.answer-check-sns-save-wrap {
    display: block !important; 
    clear: both !important; 
    width: 100% !important;
}

/* =========================================
   ページネーション（13件以上の表示用・検索ページ風）
========================================= */
.pagination-wrapper { text-align: center; margin-top: 40px; margin-bottom: 20px; }
.pagination { display: inline-flex; list-style: none; padding: 0; margin: 0; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination li { display: inline-block; }
.pagination a.page-link, .pagination span.page-current {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 12px;
    background: #ffffff; border: 2px solid #e2e8f0; border-radius: 8px;
    color: #334155; font-size: 15px; font-weight: bold; text-decoration: none; transition: all 0.2s;
    box-sizing: border-box;
}
.pagination a.page-link:hover { background: #f8fafc; border-color: #10b981; color: #10b981; }
.pagination span.page-current { background: #10b981; color: #ffffff; border-color: #10b981; }

/* ▼ 前のページに戻るボタン（明るい背景用） ▼ */
.btn-back-light { 
    background: #ffffff !important; 
    color: #475569 !important; 
    border: 2px solid #cbd5e1 !important; 
    padding: 8px 15px !important; 
    border-radius: 6px !important; 
    text-decoration: none !important; 
    font-size: 0.9rem !important; 
    font-weight: bold !important; 
    transition: 0.2s !important; 
    display: inline-block !important; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}
.btn-back-light:hover { 
    background: #f1f5f9 !important; 
    border-color: #94a3b8 !important; 
    color: #334155 !important; 
    text-decoration: none !important; 
}

/* =========================================
   プレイ画面（quiz_ox_card_play.php）専用スタイル
========================================= */

.start-btn-ox {
    color: #fff !important;
    padding: 12px 40px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 240px;
    background: #4caf50;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
    transition: transform 0.1s;
}
.start-btn-ox:hover { text-decoration: underline; }
.start-btn-ox:active { transform: translateY(2px); box-shadow: none; }

.goback-button {
    background: #e2e8f0 !important;
    color: #475569 !important;
    box-shadow: 0 4px 0 #cbd5e1 !important;
    border-radius: 25px !important;
    font-weight: bold !important;
    font-family: inherit;
}
.goback-button:active { transform: translateY(2px); box-shadow: none !important; }

.play-card-wrapper .ox-card-title { font-size: 1.4rem !important; }
.play-card-wrapper .card-meta-info { font-size: 14px !important; gap: 15px !important; }
.play-card-wrapper .ox-stat-box { padding: 15px !important; margin: 20px 0 !important; gap: 15px !important; }
.play-card-wrapper .ox-stat-label { font-size: 13px !important; margin-bottom: 6px !important; }
.play-card-wrapper .ox-stat-value { font-size: 20px !important; }