/* 2단계: 개선된 인체 지도 */
.body-map-guide {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    flex-wrap: wrap;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.guide-icon {
    font-size: 1.2rem;
}

.guide-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* 2단계: 인체 지도 */
.body-map-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.body-view-tabs {
    display: flex;
    gap: 10px;
}

.view-tab {
    padding: 12px 25px;
    background: #e0e0e0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-tab {
    padding: 15px 25px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #666;
}

.view-tab:hover {
    background: #e3f2fd;
    border-color: #2196F3;
    color: #1976d2;
    transform: translateY(-2px);
}

.view-tab.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.body-map {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

#body-svg {
    width: 100%;
    height: auto;
    max-width: 400px;
}

.body-view {
    display: none;
}

.body-view.active {
    display: block;
}

.clickable-area {
    cursor: pointer;
    transition: all 0.3s ease;
    stroke-width: 1.5;
    opacity: 0.8;
}

.clickable-area:hover {
    stroke: #2196F3;
    stroke-width: 2.5;
    fill: rgba(33, 150, 243, 0.3) !important;
    opacity: 1;
    transform-origin: center;
    transform: scale(1.05);
}

.clickable-area.selected {
    fill: rgba(255, 87, 34, 0.8) !important;
    stroke: #ff5722;
    stroke-width: 3;
    opacity: 1;
}

.clickable-area.selected:hover {
    fill: rgba(255, 87, 34, 0.9) !important;
    stroke: #e64a19;
    transform: scale(1.08);
}

/* 툴팁 스타일 */
.body-area-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.body-area-tooltip.show {
    opacity: 1;
}

/* 개선된 선택 영역 패널 */
.selected-areas-panel {
    background: white;
    border-radius: 20px;
    padding: 25px;
    min-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.panel-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.selection-count {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.selected-areas-content {
    max-height: 300px;
    overflow-y: auto;
}

.selected-areas-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.selected-areas-list li {
    padding: 12px 15px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 12px;
    border-left: 4px solid #4CAF50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.selected-areas-list li:hover {
    background: #e8f5e9;
    transform: translateX(3px);
}

.area-name {
    font-weight: 500;
    color: #333;
}

.remove-area {
    background: #ffebee;
    color: #f44336;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-area:hover {
    background: #f44336;
    color: white;
    transform: scale(1.1);
}

.panel-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.clear-btn {
    background: #ff5722;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #e64a19;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.empty-selection {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 20px;
}

.empty-selection-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}
