/* 주간보스 시급계산기 전용 스타일 (데스크탑 & 모바일 통합 최적화) */

/* 테이블 전체 컨테이너 */
#boss-table-header, 
#boss-list-container {
    max-width: 100%;
}

#boss-table-header {
    background-color: #f0f0f0;
    color: #555;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-bottom: 2px solid #d0d0d0;
    border-radius: 8px 8px 0 0;
    margin-top: 2em;
}

#boss-list-container {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: #fff;
    margin-bottom: 2em;
}

.boss-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 0.8em 0.5em;
    transition: background-color 0.2s ease-in-out;
    cursor: pointer;
    background-color: #fff;
    font-size: 0.9em;
}

.boss-row:hover { background-color: #f5f5f5; }

.boss-row.selected {
    background-color: #fffde7;
    position: relative;
    box-shadow: inset 4px 0 0 #f5a207;
}

.boss-row.header {
    cursor: default;
    padding: 1em 0.5em;
    border: none;
    background: transparent;
}

.boss-row > span { text-align: center; }

/* 컬럼별 너비 (데스크탑) */
.boss-name { width: 20%; padding-left: 1em; font-weight: 600; text-align: left !important; }
.boss-difficulty { width: 15%; }
.party-size-per-boss { width: 10%; }
.crystal-price { width: 15%; text-align: right !important; padding-right: 1em; font-weight: 600; color: #2e7d32; }
.clear-time-per-boss { width: 12%; }
.actual-clear-time { width: 13%; }
.hourly-rate-won { width: 15%; text-align: right !important; padding-right: 1em; font-weight: bold; color: #c62828; }

/* 캐릭터 관리 탭 */
.character-management {
    margin-bottom: 1.5em;
    border-bottom: 2px solid #ddd;
    display: flex;
    align-items: center; /* 하단 정렬에서 중앙 정렬로 변경하여 줄바꿈 시 정렬 최적화 */
    flex-wrap: wrap; /* 줄바꿈 허용 */
    gap: 4px;
    padding-bottom: 8px;
}

.char-tab {
    padding: 3px 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px; /* 탭 형태에서 버튼 형태로 변경하여 줄바꿈 시 어색함 감소 */
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.75em;
    margin-bottom: 2px;
}

.char-tab.active {
    background: #f5a623;
    color: white;
    border-color: #f5a623;
}

.add-char-btn {
    padding: 3px 8px !important;
    font-size: 0.75em !important;
    height: auto !important;
    min-height: unset !important;
    margin-bottom: 2px;
    background-color: #8ebebc !important;
    white-space: nowrap;
    border-radius: 6px !important;
}

.add-char-btn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.6;
    background-image: none !important;
}

.delete-char-btn {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.1);
    color: #888;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}
.char-tab.active .delete-char-btn { background: rgba(255,255,255,0.3); color: white; }
.delete-char-btn:hover { background: #e74c3c !important; color: white !important; }

/* 요약 카드 */
.summary-container { display: flex; gap: 15px; margin-bottom: 1.5em; }
.summary-card {
    flex: 1; padding: 1.2em; background: #f9f9f9; border-radius: 10px;
    border-top: 4px solid #f5a623; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.summary-card.account { border-top-color: #444; background: #f0f0f0; }
.summary-card h3 { font-size: 1em; font-weight: bold; margin-bottom: 0.8em; color: #333; border-bottom: 1px solid #ddd; padding-bottom: 0.5em; }

/* 셀렉트 및 입력창 디자인 */
.boss-row select, .boss-row input {
    width: 100%; padding: 4px 8px; border-radius: 6px; border: 1px solid #ccc;
    background-color: #fff; font-size: 0.9em; transition: border-color 0.2s;
}
.boss-row select:hover, .boss-row input:focus { border-color: #f5a623; outline: none; }

/* 반응형 (모바일) 최적화 */
@media screen and (max-width: 960px) {
    #boss-table-header { display: none; }
    #boss-list-container { border: none; background: transparent; }
    
    .summary-container { flex-direction: column; }
    
    .boss-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2em;
        margin-bottom: 12px;
        border: 1px solid #ddd;
        border-radius: 12px;
        box-shadow: 0 3px 6px rgba(0,0,0,0.05);
    }

    .boss-name { 
        width: 100%; font-size: 1.1em; margin-bottom: 0.8em; padding-left: 0;
        border-bottom: 2px solid #f5a623; padding-bottom: 0.4em; color: #333;
    }

    .boss-difficulty, .party-size-per-boss, .crystal-price, 
    .clear-time-per-boss, .actual-clear-time, .hourly-rate-won {
        width: 100%; display: flex; justify-content: space-between; align-items: center;
        padding: 0.4em 0; border-bottom: 1px solid #f5f5f5;
    }

    /* 모바일 레이블 주입 */
    .boss-difficulty::before { content: "난이도"; font-weight: bold; color: #888; font-size: 0.85em; }
    .party-size-per-boss::before { content: "파티인원"; font-weight: bold; color: #888; font-size: 0.85em; }
    .crystal-price::before { content: "획득 메소"; font-weight: bold; color: #888; font-size: 0.85em; }
    .clear-time-per-boss::before { content: "최저시급컷(분)"; font-weight: bold; color: #888; font-size: 0.85em; }
    .actual-clear-time::before { content: "클리어타임(분)"; font-weight: bold; color: #888; font-size: 0.85em; }
    .hourly-rate-won::before { content: "시급환산(원)"; font-weight: bold; color: #888; font-size: 0.85em; }

    .boss-row select, .boss-row input {
        width: 50% !important; max-width: none; text-align: right !important;
    }
    
    .crystal-price, .hourly-rate-won { padding-right: 0 !important; }
}
