.sem-detail-container, 
.sem-event-detail-container { 
    background: #ffffff; 
    padding: 25px; 
    border-radius: 8px; 
    border: 1px solid #cbd5e1; 
    margin: 20px 0; 
    font-family: inherit; 
}

.sem-back-link { margin-bottom: 20px; }
.sem-btn-back { display: inline-block; padding: 6px 12px; font-size: 13px; color: #475569; text-decoration: none; border: 1px solid #cbd5e1; border-radius: 4px; background: #f8fafc; transition: all 0.2s; }
.sem-btn-back:hover { background: #f1f5f9; color: #1e293b; border-color: #94a3b8; }

.sem-detail-header { border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; margin-bottom: 20px; }
.sem-badge-id { background: #64748b; color: #fff; padding: 2px 6px; font-size: 11px; border-radius: 3px; font-weight: bold; }
.sem-detail-title { font-size: 1.8rem; margin: 8px 0 0 0; color: #0f172a; line-height: 1.3; }

/* 타이머 전용 배너 디자인 */
.sem-timer-banner { display: flex; align-items: center; padding: 15px; border-radius: 6px; margin-bottom: 25px; font-size: 15px; font-weight: 500; }
.sem-timer-icon { font-size: 18px; margin-right: 10px; }
.sem-countdown-clock { font-family: monospace; font-weight: bold; font-size: 16px; margin: 0 4px; color: #0f172a; }

/* 상태별 타이머 색상 */
.sem-timer-banner.timer-status-ready { background-color: #f8fafc; border: 1px solid #cbd5e1; color: #475569; }
.sem-timer-banner.timer-status-active { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.sem-timer-banner.timer-status-active .sem-countdown-clock { color: #15803d; }
.sem-timer-banner.timer-status-closed { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* 대시보드형 인포 그리드 */
.sem-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 25px; }
.sem-metric-card { background: #f8fafc; padding: 15px; border-radius: 6px; border: 1px solid #e2e8f0; text-align: center; }
.sem-metric-label { font-size: 12px; color: #64748b; margin-bottom: 5px; font-weight: 600; }
.sem-metric-value { font-size: 1.4rem; font-weight: bold; color: #1e293b; }
.sem-metric-value.small-text { font-size: 13px; color: #334155; padding-top: 5px; }

/* 정보 섹션 레이아웃 */
.sem-info-section { margin-bottom: 30px; }
.sem-info-section h3 { font-size: 1.15rem; color: #1e293b; border-left: 4px solid #2271b1; padding-left: 10px; margin-bottom: 12px; }
.sem-info-row { padding: 10px 0; border-bottom: 1px dashed #e2e8f0; font-size: 14px; }
.sem-info-row strong { display: inline-block; width: 120px; color: #475569; }

/* 하위 다중 테이블 서브 스타일 */
.sem-sub-table-wrapper { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 20px; }
.sem-sub-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sem-sub-table th, .sem-sub-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.sem-sub-table th { background: #f1f5f9; color: #475569; font-weight: 600; font-size: 12px; }
.sem-sub-table tbody tr:last-child td { border-bottom: none; }
.sem-sub-table code { background: #e2e8f0; color: #334155; padding: 2px 4px; border-radius: 3px; font-size: 12px; }

.sem-no-sub-data { font-size: 13px; color: #94a3b8; font-style: italic; padding: 5px; }
.sem-condition-text { font-size: 12px; color: #646970; background: #f0f0f1; padding: 2px 6px; border-radius: 3px; display: inline-block; }

/* ==========================================================================
   [입력 및 선택 페이지 스타일] - frontend-event-select.php 기반 추가
   ========================================================================== */
.sem-selection-form h3 { font-size: 1.15rem; color: #1e293b; border-left: 4px solid #0073aa; padding-left: 10px; margin-top: 25px; margin-bottom: 12px; }
.sem-stem-question { font-weight: bold; margin-bottom: 15px; color: #1e293b; background: #f8fafc; padding: 10px; border-left: 3px solid #64748b; }
.sem-radio-label { display: block; margin-bottom: 10px; padding: 8px; border: 1px solid #f1f5f9; border-radius: 4px; cursor: pointer; }
.sem-radio-label:hover { background: #f8fafc; }
.sem-form-group { margin-bottom: 15px; }
.sem-form-group label { display: block; margin-bottom: 6px; font-weight: bold; color: #334155; }
.sem-form-input { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.sem-form-textarea { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 4px; font-size: 14px; box-sizing: border-box; resize: vertical; }

.sem-submit-container { margin-top: 20px; }
.sem-btn-submit { padding: 12px 24px; background: #0073aa; color: #fff; border: none; border-radius: 4px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.sem-btn-submit:hover { background: #005984; }
.sem-ajax-msg { margin-top: 12px; font-weight: bold; font-size: 14px; }

/* ==========================================================================
   [예측 사건 목록 페이지 스타일]
   ========================================================================== */
/* 프론트엔드 스타일 격리 및 테마 호환성 확보 */
.sem-frontend-wrap { margin: 20px 0; font-family: inherit; }
.sem-page-title {
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}
@media (max-width: 600px) {
    .sem-page-title { font-size: 1.6rem; }
}

/* 가로 스크롤 보장 (모바일 대응) */
.sem-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sem-frontend-table { 
    width: 100%; 
    min-width: 900px; 
    border-collapse: collapse; 
    margin-top: 10px; 
    font-size: 14px; 
    text-align: left; 
}
.sem-frontend-table th, .sem-frontend-table td { 
    padding: 12px 10px; 
    border-bottom: 1px solid #e2e8f0; 
    vertical-align: middle; 
}
.sem-frontend-table th { 
    background-color: #f8fafc; 
    color: #334155; 
    font-weight: 600; 
    white-space: nowrap;   /* 추가: 헤더(th)만 줄바꿈 방지 */
}
.sem-frontend-table tbody tr:hover { background-color: #f1f5f9; }

/* 뱃지 및 상태 스타일 */
.sem-status-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.sem-status-free { background-color: #e7f5ea !important; color: #13783a; }
.sem-status-explaining { background-color: #fef3d6 !important; color: #8a6d1c; }
.sem-status-directional { background-color: #e8f4fd !important; color: #1d6fa5; }

.sem-count-badge { display: block; padding: 2px 6px; font-size: 11px; border-radius: 4px; border: 1px solid #e2e8f0; background: #fff; color: #475569; width: fit-content; }
.sem-count-badge strong { color: #2271b1; }

.sem-date-cell { font-size: 12px; color: #64748b; line-height: 1.4; }
.sem-no-data { text-align: center; padding: 40px 0 !important; color: #94a3b8; }

/* 거래 상태 라벨 스타일 */
.sem-trade-status { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: bold; margin-bottom: 6px; }
.sem-trade-status.status-ready { background-color: #f1f5f9; color: #64748b; } /* 회색 */
.sem-trade-status.status-active { background-color: #e6f4ea; color: #137333; } /* 초록색 */
.sem-trade-status.status-closed { background-color: #fce8e6; color: #c5221f; } /* 빨간색 */

/* 예측 사건 참여 및 상태 버튼 영역 */
.sem-participation-action-zone {
    margin: 20px 0;
    text-align: right;
}

/* 기본 버튼 공통 스타일 */
.sem-participation-action-zone .sem-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* 1. 거래 종료 버튼 (Disabled) */
.sem-participation-action-zone .sem-btn-disabled {
    background-color: #cccccc;
    color: #ffffff;
    cursor: not-allowed;
}

/* 2. 로그인 유도 버튼 */
.sem-participation-action-zone .sem-btn-login {
    background-color: #3c434a;
    color: #ffffff;
}
.sem-participation-action-zone .sem-btn-login:hover {
    background-color: #2c3338;
    color: #ffffff;
}

/* 3. 이미 참여 완료 버튼 */
.sem-participation-action-zone .sem-btn-success {
    background-color: #46b450;
    color: #ffffff;
    cursor: default;
}

/* 4. 활성화된 참여하기 버튼 */
.sem-participation-action-zone .sem-btn-action {
    background-color: #007cba;
    color: #ffffff;
    padding: 12px 24px;
    font-weight: bold;
}
.sem-participation-action-zone .sem-btn-action:hover {
    background-color: #006ba1;
    color: #ffffff;
    transform: translateY(-1px);
}
.sem-participation-action-zone .sem-btn-action:active {
    transform: translateY(0);
}
.sem-participation-action-zone .sem-btn-edit {
    background-color: #f0ad4e; /* 주황 계열 등 '수정' 느낌 나는 색상 */
    color: #fff;
}