/* ============================================================
 *  jc.php 专属样式（竞彩首页）
 *  依赖：public/css/style.css 已先加载
 * ============================================================ */

/* ============================================================
 *  一、搜索框
 * ============================================================ */
.jc-search-box {
    display: flex !important;
    align-items: center;
    background: #fff;
    margin: 10px 12px 0;
    padding: 10px 14px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    height: auto !important;
    min-height: 40px;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
    overflow: visible;
}
.jc-search-icon {
    font-size: 16px;
    color: #999;
    margin-right: 6px;
}
.jc-search-box input {
    display: block !important;
    flex: 1;
    border: none !important;
    outline: none !important;
    font-size: 14px;
    background: transparent !important;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333;
}
#jcSearchClearBtn {
    display: none;
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 0 6px;
}
#jcSearchCount {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
    white-space: nowrap;
}

/* ============================================================
 *  计算器手机端布局（与北单保持一致）
 * ============================================================ */
@media screen and (max-width: 600px) {
    .calc-row {
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }
    .calc-row .btn {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        padding: 6px 10px !important;
        font-size: 14px !important;
        margin: 2px !important;
    }
    .calc-odds-display {
        flex: 0 1 auto !important;
        min-width: 70px !important;
        margin-right: 4px !important;
    }
    .calc-input-group input {
        width: 60px !important;
        font-size: 16px !important;
    }
}

/* ============================================================
 *  二、竞彩标签 & 场次号
 * ============================================================ */
.jc-tag {
    display: inline-block;
    background: #ffd700;
    color: #152f52;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 700;
    line-height: 1.4;
    flex-shrink: 0;
}
.jc-num-badge {
    background: #e74c3c !important;
    color: #fff !important;
}
.match-card.jc-hidden {
    display: none !important;
}

/* ============================================================
 *  三、卡片容器
 * ============================================================ */
.match-card {
    background: #fff;
    margin: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.match-header {
    padding: 10px 14px 8px;
    cursor: pointer;
    user-select: none;
}

.unlock-qr-top {
    margin: 0 0 20px 0;
    text-align: center;
}
.unlock-qr-top img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 1px solid #ddd;
    display: inline-block;
}
.unlock-qr-tip {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
}

/* 第一行：联赛 + 标签 | 时间 */
.mc-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.mc-top-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.mc-top-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.league-name {
    font-size: 13px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}
.match-time-display {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

/* 第二行：场次号 + 对阵 + 状态 */
.mc-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2px 0 4px;
}
.match-num {
    background: #152f52;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.5;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.match-teams {
    font-size: 17px;
    font-weight: 600;
    color: #1a2332;
    text-align: center;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.match-teams .home-name,
.match-teams .away-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%;
}
.match-teams .vs {
    color: #ccc;
    font-weight: 400;
    font-size: 12px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* 让球徽章 */
.mc-handicap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 4px;
    flex-shrink: 0;
}
.mc-handicap .hc-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    display: inline-block;
    vertical-align: middle;
}

/* 状态徽章 */
.match-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.6;
    display: inline-block;
    flex-shrink: 0;
}
.match-status-badge.selling {
    color: #27ae60;
    background: #eafaf1;
}
.match-status-badge.stopped-sale {
    color: #95a5a6;
    background: #eef1f4;
}
.match-status-text {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
}
.match-status-text.finished {
    color: #27ae60;
}

/* ============================================================
 *  四、赔率区（jc_main.js 注入）
 * ============================================================ */
 .single-tag {
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 4px;
}
.match-body {
    padding: 0 14px 14px;
    background: #fff;
}
.match-body.collapsed {
    display: none;
}

/* 胜平负 / 让球胜平负（3 列） */
.match-body .odds-hda {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: stretch;
}
.match-body .odds-hda .hda-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.match-body .odds-hda .hda-item .label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
}
.match-body .odds-hda .hda-item .value {
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
    line-height: 1.3;
}
.match-body .odds-hda .hda-item .value.draw {
    color: #f39c12;
}
.match-body .odds-hda .hda-item:active {
    transform: scale(0.97);
}
.match-body .odds-hda .hda-item.selected {
    background: #e8f0fb;
    border-color: #152f52;
}

/* 比分 / 半全场 */
.match-body .grid-4,
.match-body .grid-3 {
    display: grid;
    gap: 6px;
    margin-bottom: 8px;
}
.match-body .grid-4 { grid-template-columns: repeat(5, 1fr); }
.match-body .grid-3 { grid-template-columns: repeat(3, 1fr); }
.match-body .grid-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 6px 2px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
}
.match-body .grid-item .label {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}
.match-body .grid-item .odds {
    font-size: 12px;
    font-weight: 700;
    color: #e74c3c;
    line-height: 1.3;
}
.match-body .grid-item:active { transform: scale(0.96); }
.match-body .grid-item.selected {
    background: #e8f0fb;
    border-color: #152f52;
}

/* 总进球 */
.match-body .jq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.match-body .odds-tag {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.match-body .odds-tag .label-text {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}
.match-body .odds-tag .val {
    font-size: 15px;
    font-weight: 700;
    color: #e74c3c;
    line-height: 1.2;
}
.match-body .odds-tag:active { transform: scale(0.96); }
.match-body .odds-tag.selected {
    background: #e8f0fb;
    border-color: #152f52;
}

/* 分区标题 */
.match-body .section-title {
    font-size: 12px;
    font-weight: 600;
    color: #152f52;
    margin: 6px 0 4px;
    padding-left: 2px;
}

/* ============================================================
 *  五、玩法过滤 & 解锁弹窗
 * ============================================================ */
.match-card.jc-play-hidden {
    display: none !important;
}

#unlockOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
#unlockOverlay.show {
    display: flex;
}
.unlock-box {
    background: #fff;
    border-radius: 24px;
    padding: 30px 35px 25px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}
.unlock-content {
    text-align: center;
}
.unlock-title {
    font-size: 22px;
    font-weight: 700;
    color: #152f52;
    margin-bottom: 10px;
}
.unlock-desc {
    font-size: 16px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.5;
}
.unlock-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.unlock-buttons .btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    min-width: 120px;
}
.unlock-buttons .btn-ad {
    background: #27ae60;
    color: #fff;
}
.unlock-buttons .btn-pay {
    background: #f39c12;
    color: #fff;
}
.close-unlock {
    position: absolute;
    top: 12px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    color: #aaa;
    cursor: pointer;
}

/* 解锁弹窗内嵌内容 */
.hidden-area {
    display: none;
}
.qr-code-block {
    text-align: center;
}
.qr-code-img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.qr-code-hint {
    font-size: 14px;
    color: #555;
    margin: 8px 0;
}
.qr-password-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.qr-password-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    flex: 1;
    max-width: 200px;
}
.btn-confirm {
    background: #152f52;
    color: #fff;
    padding: 8px 20px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}
.qr-cancel-row {
    text-align: center;
    margin-top: 8px;
}
.btn-cancel {
    background: #eef1f4;
    border: none;
    padding: 6px 18px;
    border-radius: 30px;
    cursor: pointer;
}

#adDisplay {
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #1a2332;
    position: relative;
}
.ad-img {
    width: 100%;
    display: block;
    height: auto;
    border-radius: 12px;
}
#adCountdown {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #152f52;
    background: #f0f2f5;
    padding: 10px 0;
    border-radius: 30px;
    text-align: center;
}

/* ============================================================
 *  六、手机适配
 * ============================================================ */
@media (max-width: 600px) {
    .match-card { margin: 6px 8px; }
    .match-header { padding: 8px 12px 6px; }
    .match-teams { font-size: 15px; }
    .match-num { font-size: 10px; padding: 1px 7px; }
    .match-body { padding: 0 12px 12px; }
    .match-body .odds-hda .hda-item .value { font-size: 15px; }
    .match-body .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .match-body .jq-grid { grid-template-columns: repeat(4, 1fr); }
    .match-status-badge { font-size: 10px; padding: 1px 8px; }
}