/**
 * Joyn Bible Quiz - Main Styles
 * 게임 메인 스타일
 * 
 * @package Joyn_Bible_Quiz
 * @since 1.0.0
 */

/* === 라이트 모드 강제 적용 (검정색 배경 방지) === */
.joyn-bq-container {
    background: #ffffff !important;
    color: #333333 !important;
}

.joyn-bq-stat,
.joyn-bq-category-card,
.joyn-bq-stage-card,
.joyn-bq-question-card,
.joyn-bq-feedback-card,
.joyn-bq-result-card,
.joyn-bq-error-card {
    background: #ffffff !important;
    color: #333333 !important;
}

/* 텍스트 요소 색상 강제 (모든 텍스트를 어두운 색으로) */
.joyn-bq-title,
.joyn-bq-category-name,
.joyn-bq-category-desc,
.joyn-bq-stage-name,
.joyn-bq-stage-desc,
.joyn-bq-question-text,
.joyn-bq-stat-label,
.joyn-bq-game-info,
.joyn-bq-bible-ref,
.joyn-bq-answer-text,
.joyn-bq-feedback-title,
.joyn-bq-answer-label,
.joyn-bq-answer-value,
.joyn-bq-explanation,
.joyn-bq-result-title,
.joyn-bq-result-label,
.joyn-bq-error-title,
.joyn-bq-error-message,
.joyn-bq-notice,
.joyn-bq-hint-box p {
    color: #333333 !important;
}

.joyn-bq-stat-label,
.joyn-bq-category-desc,
.joyn-bq-stage-desc,
.joyn-bq-bible-ref,
.joyn-bq-answer-label,
.joyn-bq-result-label,
.joyn-bq-error-message {
    color: #6c757d !important;
}

/* === 컨테이너 === */
.joyn-bq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #333333;
}

/* === 화면 === */
.joyn-bq-screen {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === 헤더 === */
.joyn-bq-header {
    text-align: center;
    margin-bottom: 30px;
}

.joyn-bq-title {
    font-size: 2em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* === 통계 박스 === */
.joyn-bq-stats-box {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: nowrap;
}

.joyn-bq-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 15px;
    background: #ffffff !important;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    color: #333333 !important;
    flex: 1;
    min-width: 0;
}

.joyn-bq-stat-label {
    font-size: 0.85em;
    color: #6c757d !important;
    margin-bottom: 4px;
    text-align: center;
    line-height: 1.2;
}

.joyn-bq-stat-value {
    font-size: 1.6em;
    font-weight: bold;
    color: #4A90D9;
    text-align: center;
}

.joyn-bq-stat-value.depleted {
    color: #dc3545;
}

/* === 버튼 === */
.joyn-bq-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
}

.joyn-bq-btn-primary {
    background: #4A90D9;
    color: white;
}

.joyn-bq-btn-primary:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.joyn-bq-btn-secondary {
    background: #6c757d;
    color: white;
}

.joyn-bq-btn-secondary:hover {
    background: #5a6268;
}

.joyn-bq-btn-large {
    padding: 16px 40px;
    font-size: 1.1em;
}

.joyn-bq-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === 카테고리 === */
.joyn-bq-categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.joyn-bq-category-card {
    padding: 30px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #333333 !important;
}

.joyn-bq-category-card:hover {
    border-color: #4A90D9;
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.joyn-bq-category-card.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
}

.joyn-bq-category-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.joyn-bq-category-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333333 !important;
    margin: 10px 0;
}

.joyn-bq-category-desc {
    color: #6c757d !important;
    font-size: 0.9em;
}

/* === 스테이지 === */
.joyn-bq-stages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.joyn-bq-stage-card {
    padding: 20px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: #333333 !important;
}

.joyn-bq-stage-card:hover:not(.locked) {
    border-color: #4A90D9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.joyn-bq-stage-card.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
}

.joyn-bq-stage-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.joyn-bq-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.joyn-bq-stage-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #4A90D9;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-weight: bold;
}

.joyn-bq-lock-icon {
    font-size: 1.2em;
}

.joyn-bq-stage-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #333333 !important;
    margin: 10px 0;
}

.joyn-bq-stage-desc {
    font-size: 0.85em;
    color: #6c757d !important;
    margin: 10px 0;
}

.joyn-bq-stage-stars {
    font-size: 1.2em;
    margin: 10px 0;
}

.joyn-bq-stage-best {
    font-size: 0.85em;
    color: #4A90D9;
    font-weight: 600;
}

/* === 게임 화면 === */
.joyn-bq-game-header {
    margin-bottom: 20px;
}

.joyn-bq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.joyn-bq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90D9, #5ba3f5);
    transition: width 0.5s ease;
}

.joyn-bq-game-info {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #495057 !important;
}

/* === 문제 카드 === */
.joyn-bq-question-container {
    margin-bottom: 20px;
}

.joyn-bq-question-card {
    background: #ffffff !important;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    color: #333333 !important;
}

.joyn-bq-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.joyn-bq-difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.joyn-bq-difficulty-very_easy {
    background: #d4edda;
    color: #155724;
}

.joyn-bq-difficulty-easy {
    background: #d1ecf1;
    color: #0c5460;
}

.joyn-bq-difficulty-normal {
    background: #fff3cd;
    color: #856404;
}

.joyn-bq-difficulty-hard {
    background: #f8d7da;
    color: #721c24;
}

.joyn-bq-difficulty-very_hard {
    background: #d6d8db;
    color: #1b1e21;
}

.joyn-bq-bible-ref {
    color: #6c757d;
    font-size: 0.9em;
}

.joyn-bq-question-text {
    font-size: 1.3em;
    line-height: 1.6;
    color: #212529;
    margin-bottom: 25px;
}

/* === 답변 옵션 === */
.joyn-bq-answers {
    margin: 20px 0;
}

/* OX 버튼 */
.joyn-bq-ox-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.joyn-bq-ox-btn {
    flex: 1;
    max-width: 200px;
    padding: 40px 20px;
    background: #ffffff !important;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    color: #333333 !important;
}

.joyn-bq-ox-btn:hover {
    border-color: #4A90D9;
    transform: scale(1.05);
}

.joyn-bq-ox-btn.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
}

.joyn-bq-ox-icon {
    font-size: 2em;
}

/* 객관식 버튼 */
.joyn-bq-answer-btn {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    color: #333333 !important;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: none; /* 모든 transition 제거 - 즉시 반응 */
    -webkit-tap-highlight-color: transparent; /* 모바일 탭 하이라이트 제거 */
}

.joyn-bq-answer-btn * {
    pointer-events: none;
}

.joyn-bq-answer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 마우스 오버 효과 완전 제거 - 떨림 방지 */

/* :active와 .clicked 효과 제거 - 즉시 반응을 위해 */

.joyn-bq-answer-btn.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.2);
}

.joyn-bq-answer-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #4A90D9;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.joyn-bq-answer-text {
    flex: 1;
    font-size: 1.05em;
    color: #333333 !important;
}

/* 주관식 입력 */
.joyn-bq-text-input {
    margin: 20px 0;
}

.joyn-bq-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    background: #ffffff !important;
    color: #333333 !important;
}

.joyn-bq-input:focus {
    outline: none;
    border-color: #4A90D9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.joyn-bq-text-length-indicator {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9em;
    color: #6c757d !important;
    font-weight: 600;
}

.joyn-bq-text-length-indicator #joyn-bq-text-length {
    color: #333333 !important;
    font-weight: bold;
}

/* === 힌트 박스 === */
/* 힌트 버튼 비활성화 스타일 */
.joyn-bq-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.joyn-bq-hint-box {
    margin-top: 20px;
    padding: 15px 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.joyn-bq-hint-box p {
    margin: 0;
    color: #856404;
}

/* === 게임 액션 === */
.joyn-bq-game-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === 피드백 화면 === */
.joyn-bq-feedback-card {
    background: #ffffff !important;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    color: #333333 !important;
    animation: feedbackSlideIn 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.joyn-bq-feedback-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4A90D9, #5ba3f5);
    transform: scaleX(0);
    transform-origin: left;
    animation: feedbackProgressBar 0.6s ease-out 0.2s forwards;
}

.joyn-bq-feedback-card.feedback-correct::before {
    background: linear-gradient(90deg, #28a745, #48c66a);
}

.joyn-bq-feedback-card.feedback-wrong::before {
    background: linear-gradient(90deg, #dc3545, #e57373);
}

.joyn-bq-feedback-card.feedback-timeout::before {
    background: linear-gradient(90deg, #ffc107, #ffd54f);
}

@keyframes feedbackSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes feedbackProgressBar {
    to {
        transform: scaleX(1);
    }
}

.joyn-bq-feedback-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: feedbackIconBounce 0.6s ease-out;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-feedback-icon {
    animation: feedbackIconBounce 0.6s ease-out, feedbackCorrectPulse 2s ease-in-out infinite 0.6s;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-feedback-icon {
    animation: feedbackIconBounce 0.6s ease-out, feedbackWrongShake 0.5s ease-out 0.6s;
}

.joyn-bq-feedback-card.feedback-timeout .joyn-bq-feedback-icon {
    animation: feedbackIconBounce 0.6s ease-out, feedbackTimeoutRing 2s ease-in-out infinite 0.6s;
}

@keyframes feedbackIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes feedbackCorrectPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes feedbackWrongShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateX(10px) rotate(5deg);
    }
}

@keyframes feedbackTimeoutRing {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.joyn-bq-feedback-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333333 !important;
    position: relative;
    padding-bottom: 15px;
}

.joyn-bq-feedback-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #4A90D9;
    border-radius: 2px;
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-feedback-title::after {
    background: #28a745;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-feedback-title::after {
    background: #dc3545;
}

.joyn-bq-feedback-card.feedback-timeout .joyn-bq-feedback-title::after {
    background: #ffc107;
}

.joyn-bq-answer-section {
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-answer-section {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-answer-section,
.joyn-bq-feedback-card.feedback-timeout .joyn-bq-answer-section {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.joyn-bq-answer-label {
    font-size: 0.95em;
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.joyn-bq-answer-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #212529;
    line-height: 1.4;
    word-break: keep-all;
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-answer-value {
    color: #155724;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-answer-value,
.joyn-bq-feedback-card.feedback-timeout .joyn-bq-answer-value {
    color: #856404;
}

.joyn-bq-explanation {
    margin: 25px 0;
    padding: 25px;
    background: linear-gradient(135deg, #e7f3ff 0%, #d6eaff 100%);
    border-radius: 12px;
    text-align: left;
    line-height: 1.8;
    color: #333333 !important;
    border-left: 4px solid #4A90D9;
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.1);
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-explanation {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-explanation,
.joyn-bq-feedback-card.feedback-timeout .joyn-bq-explanation {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left-color: #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.1);
}

.joyn-bq-explanation p {
    margin: 0;
}

.joyn-bq-explanation strong {
    color: #4A90D9;
    font-weight: 600;
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-explanation strong {
    color: #28a745;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-explanation strong,
.joyn-bq-feedback-card.feedback-timeout .joyn-bq-explanation strong {
    color: #856404;
}

.joyn-bq-feedback-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    flex-wrap: wrap;
}

.joyn-bq-feedback-stats span {
    font-size: 1.2em;
    font-weight: 600;
    color: #495057;
    padding: 10px 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 120px;
}

.joyn-bq-feedback-stats span:first-child {
    color: #4A90D9;
    font-size: 1.3em;
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-feedback-stats span:first-child {
    color: #28a745;
}

.joyn-bq-feedback-card.feedback-wrong .joyn-bq-feedback-stats span:first-child,
.joyn-bq-feedback-card.feedback-timeout .joyn-bq-feedback-stats span:first-child {
    color: #dc3545;
}

.joyn-bq-feedback-actions {
    margin-top: 25px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.joyn-bq-feedback-next-btn {
    margin-top: 20px;
    padding: 16px 40px;
    font-size: 1.1em;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
    transition: all 0.3s ease;
}

.joyn-bq-feedback-next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 217, 0.4);
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-feedback-next-btn {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.joyn-bq-feedback-card.feedback-correct .joyn-bq-feedback-next-btn:hover {
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.joyn-bq-btn-small {
    font-size: 0.9em;
    padding: 10px 18px;
    border-radius: 6px;
}

/* === 결과 화면 === */
.joyn-bq-result-card {
    background: #ffffff !important;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    color: #333333 !important;
}

.joyn-bq-result-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333333 !important;
}

.joyn-bq-stars {
    font-size: 3em;
    margin: 20px 0;
}

.joyn-bq-result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.joyn-bq-result-stat {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.joyn-bq-result-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 5px;
}

.joyn-bq-result-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #4A90D9;
}

.joyn-bq-jseeds-reward {
    margin: 20px 0;
    padding: 15px 20px;
    background: #d4edda;
    border-radius: 8px;
    color: #155724;
    font-weight: 600;
}

.joyn-bq-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* === 에러 화면 === */
.joyn-bq-error-card {
    background: #ffffff !important;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    color: #333333 !important;
}

.joyn-bq-error-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.joyn-bq-error-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 15px;
}

.joyn-bq-error-message {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* === 리더보드 === */
.joyn-bq-leaderboard-period-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.joyn-bq-period-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff !important;
    color: #333333 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.joyn-bq-period-btn:hover {
    border-color: #4A90D9;
    background: #f0f7ff !important;
}

.joyn-bq-period-btn.active {
    background: #4A90D9 !important;
    color: white !important;
    border-color: #4A90D9;
}

.joyn-bq-leaderboard-wrapper {
    margin: 20px 0;
    overflow-x: auto;
}

.joyn-bq-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff !important;
    border-radius: 8px;
    overflow: hidden;
}

.joyn-bq-leaderboard-table thead {
    background: #f8f9fa;
}

.joyn-bq-leaderboard-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333333 !important;
    border-bottom: 2px solid #e9ecef;
}

.joyn-bq-leaderboard-table th:first-child {
    text-align: center;
}

.joyn-bq-leaderboard-table th:last-child {
    text-align: right;
}

.joyn-bq-leaderboard-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.joyn-bq-leaderboard-table tbody tr:hover {
    background: #f8f9fa;
}

.joyn-bq-leaderboard-table tbody tr.is-current-user {
    background: #f0f7ff;
    font-weight: 600;
}

.joyn-bq-leaderboard-table td {
    padding: 15px;
    color: #333333 !important;
}

.joyn-bq-leaderboard-rank {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1em;
}

.joyn-bq-leaderboard-rank.rank-1 {
    background: #ffd700;
    color: #333;
}

.joyn-bq-leaderboard-rank.rank-2 {
    background: #c0c0c0;
    color: #333;
}

.joyn-bq-leaderboard-rank.rank-3 {
    background: #cd7f32;
    color: #fff;
}

.joyn-bq-leaderboard-rank.rank-other {
    background: #e9ecef;
    color: #333;
}

.joyn-bq-leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.joyn-bq-leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4A90D9;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.joyn-bq-leaderboard-name {
    font-size: 1.05em;
    color: #333333 !important;
}

.joyn-bq-leaderboard-points {
    text-align: right;
    font-size: 1.1em;
    font-weight: 600;
    color: #4A90D9;
}

/* === 로딩 === */
#joyn-bq-loading {
    text-align: center;
    padding: 60px 20px;
}

.joyn-bq-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4A90D9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === 알림 === */
.joyn-bq-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    max-width: 400px;
    color: #333333 !important;
}

.joyn-bq-notice-success {
    border-left: 4px solid #28a745;
}

.joyn-bq-notice-error {
    border-left: 4px solid #dc3545;
}

.joyn-bq-notice-info {
    border-left: 4px solid #17a2b8;
}

/* === 로그인 필요 === */
.joyn-bq-login-required {
    text-align: center;
    padding: 60px 20px;
}

.joyn-bq-login-required .joyn-bq-notice {
    position: static;
    max-width: 500px;
    margin: 0 auto;
}

/* === 액션 섹션 === */
.joyn-bq-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* === 구약/신약/랜덤 선택 === */
.joyn-bq-testament-selection {
    margin: 20px 0;
}

.joyn-bq-subtitle {
    font-size: 1.1em;
    font-weight: 600;
    color: #333333 !important;
    text-align: center;
    margin-bottom: 15px;
}

.joyn-bq-testament-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.joyn-bq-testament-card {
    flex: 1;
    min-width: 100px;
    max-width: 200px;
    padding: 20px 15px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #333333 !important;
}

.joyn-bq-testament-card:hover {
    border-color: #4A90D9;
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.2);
}

.joyn-bq-testament-card.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.3);
}

.joyn-bq-testament-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.joyn-bq-testament-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333333 !important;
    margin: 8px 0;
}

.joyn-bq-testament-desc {
    color: #6c757d !important;
    font-size: 0.85em;
    line-height: 1.3;
}

/* === 성경 선택 === */
.joyn-bq-book-selection {
    margin: 30px 0;
}

.joyn-bq-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.joyn-bq-book-card {
    padding: 12px 10px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #333333 !important;
}

.joyn-bq-book-card:hover {
    border-color: #4A90D9;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.joyn-bq-book-card.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.2);
}

.joyn-bq-book-short {
    font-size: 0.9em;
    font-weight: bold;
    color: #4A90D9;
    margin-bottom: 4px;
}

.joyn-bq-book-name {
    font-size: 0.7em;
    color: #6c757d !important;
    line-height: 1.2;
}

.joyn-bq-btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* === 레벨 선택 === */
.joyn-bq-level-selection {
    margin: 20px 0;
}

.joyn-bq-level-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.joyn-bq-level-card {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
    padding: 25px 20px;
    background: #ffffff !important;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #333333 !important;
}

.joyn-bq-level-card:hover {
    border-color: #4A90D9;
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.2);
}

.joyn-bq-level-card.selected {
    border-color: #4A90D9;
    background: #f0f7ff;
    box-shadow: 0 8px 24px rgba(74, 144, 217, 0.3);
}

.joyn-bq-level-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.joyn-bq-level-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333333 !important;
    margin: 10px 0;
}

.joyn-bq-level-desc {
    color: #6c757d !important;
    font-size: 0.85em;
    line-height: 1.4;
}

/* === 모바일 반응형 === */
@media (max-width: 768px) {
    .joyn-bq-container {
        padding: 10px;
    }
    
    .joyn-bq-stats-box {
        gap: 6px;
        margin-bottom: 12px;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .joyn-bq-stat {
        padding: 10px 6px;
        min-width: 0;
        flex: 1;
        width: 50%;
    }
    
    .joyn-bq-stat-label {
        font-size: 0.65em;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .joyn-bq-stat-value {
        font-size: 1.2em;
    }
    
    .joyn-bq-testament-cards {
        gap: 6px;
        margin-bottom: 12px;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .joyn-bq-testament-card {
        min-width: 0;
        max-width: none;
        padding: 12px 6px;
        flex: 1;
        width: 33.33%;
    }
    
    .joyn-bq-testament-icon {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    .joyn-bq-testament-name {
        font-size: 1em;
        margin: 5px 0;
    }
    
    .joyn-bq-testament-desc {
        font-size: 0.75em;
    }
    
    .joyn-bq-subtitle {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .joyn-bq-title {
        font-size: 1.5em;
    }
    
    .joyn-bq-header {
        margin-bottom: 15px;
    }
    
    .joyn-bq-level-cards {
        gap: 8px;
        margin-bottom: 12px;
        flex-wrap: nowrap;
        width: 100%;
    }
    
    .joyn-bq-level-card {
        min-width: 0;
        max-width: none;
        padding: 15px 8px;
        flex: 1;
        width: 33.33%;
    }
    
    .joyn-bq-level-icon {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
    
    .joyn-bq-level-name {
        font-size: 0.9em;
        margin: 6px 0;
    }
    
    .joyn-bq-level-desc {
        font-size: 0.7em;
        line-height: 1.3;
    }
    
    /* 게임 액션 버튼 순서 변경 (모바일: 제출 → 힌트 → 건너뛰기) */
    .joyn-bq-game-actions {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
    
    #joyn-bq-submit-btn {
        order: 1;
    }
    
    #joyn-bq-hint-btn {
        order: 2;
    }
    
    #joyn-bq-skip-btn {
        order: 3;
    }
}
