/* ============================================
   RESULT MODAL STYLES
   ============================================ */

/* Result Screen — 이미지 없이 day_select.webp 느낌을 CSS로 재현 */
/* 통계 모달과 동일: 헤더/푸터 고정, 본문만 스크롤 */
#result-modal .result-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    /* 타이틀 컨테이너 크기를 기준으로 설정 (다른 modal들과 동일) */
    width: 90%;
    max-width: min(90%, var(--title-container-width, 95vw));
    max-height: min(var(--title-container-height, 95vh), 85vh);
    padding: 22px 22px 18px;
    border-radius: 18px;
    overflow: hidden;
    background: radial-gradient(
            120% 120% at 50% 0%,
            rgba(255, 215, 130, 0.06) 0%,
            rgba(0, 0, 0, 0) 55%
        ),
        radial-gradient(140% 120% at 50% 110%, rgba(255, 120, 50, 0.08) 0%, rgba(0, 0, 0, 0) 55%),
        linear-gradient(180deg, rgba(22, 24, 33, 0.98) 0%, rgba(12, 13, 18, 0.98) 100%);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

/* 금색 외곽 프레임 */
.result-modal::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 14px;
    border: 3px solid rgba(231, 189, 105, 0.95);
    box-shadow: 0 0 0 2px rgba(70, 48, 16, 0.85), inset 0 0 18px rgba(255, 208, 120, 0.1);
    pointer-events: none;
}

/* 내부 얇은 라인 */
.result-modal::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 228, 165, 0.22);
    pointer-events: none;
}

.result-modal-title {
    flex-shrink: 0;
    text-align: center;
    font-weight: 900;
    letter-spacing: 1px;
    font-size: 24px;
    color: rgba(255, 214, 120, 0.98);
    text-shadow: 0 2px 0 rgba(60, 40, 10, 0.9), 0 10px 24px rgba(0, 0, 0, 0.6);
    margin: 10px 0 18px;
}

/* 통계 모달 .modal-body와 동일: 스크롤 영역 */
.result-modal-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 215, 130, 0.18);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.35);
}

.result-modal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
    font-size: 17px;
    color: rgba(235, 235, 245, 0.95);
}

.result-label {
    opacity: 0.92;
}

.result-value {
    font-weight: 800;
}

.result-value.gold {
    color: var(--gold);
}

.result-value.danger {
    color: var(--danger);
}

.result-modal-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 900;
    font-size: 17px;
    color: rgba(170, 225, 255, 0.95);
}

/* 이번 게임 기록 / 틀린 단어 (statistics 스타일 참조) */
.result-record-container {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.result-wrong-words-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

#result-modal .result-wrong-word-item {
    background: rgba(0, 0, 0, 0.25);
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 120, 80, 0.25);
    text-align: center;
    width: 100%; /* Ensure it takes full width */
}

#result-modal .result-wrong-word-item .wrong-word {
    font-weight: bold;
    color: rgba(255, 200, 150, 0.95);
    font-size: 17px;
}

#result-modal .result-wrong-word-item .wrong-meaning {
    font-size: 17px;
    color: rgba(235, 235, 245, 0.85);
    margin-left: 8px;
}

.result-modal-actions {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin-top: 16px;
    padding-bottom: 8px;
}

.result-btn {
    min-width: min(78%, 360px);
    height: 58px;
    border-radius: 14px;
    border: 3px solid rgba(231, 189, 105, 0.9);
    font-weight: 900;
    font-size: clamp(16px, 4vw, 20px);
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.result-btn:active {
    transform: translateY(1px);
}

.result-btn-gold {
    color: rgba(20, 15, 10, 0.92);
    background: linear-gradient(
        180deg,
        rgba(255, 244, 205, 0.95) 0%,
        rgba(255, 205, 95, 0.95) 45%,
        rgba(214, 140, 45, 0.95) 100%
    );
    position: relative;
}

.result-btn-gold::before {
    content: '';
    position: absolute;
    inset: 6px 10px auto 10px;
    height: 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    pointer-events: none;
}
